rethinkdb / rethinkdb-python

Python driver for RethinkDB
https://rethinkdb.com/api/python/
Apache License 2.0
64 stars 35 forks source link

Encountering primary key error while running rethinkdb restore for rethinkdb 2.4 version #281

Open harsha448 opened 1 year ago

harsha448 commented 1 year ago

/usr/bin/rethinkdb restore backup.tar.gz -c "server_ip" --password-file ./password.txt --no-secondary-indexes --force Extracting archive file... Done (2 seconds) Importing from directory... Traceback (most recent call last): File "/usr/local/bin/rethinkdb-restore", line 8, in sys.exit(main()) File "/usr/local/lib/python3.7/site-packages/rethinkdb/_restore.py", line 339, in main do_restore(options) File "/usr/local/lib/python3.7/site-packages/rethinkdb/_restore.py", line 315, in do_restore _import.import_tables(options, sources) File "/usr/local/lib/python3.7/site-packages/rethinkdb/_import.py", line 1315, in import_tables .pluck(["db", "name", "primary_key"]), File "/usr/local/lib/python3.7/site-packages/rethinkdb/_import.py", line 1311, in for x in options.retryQuery( KeyError: 'primary_key'

lsabi commented 1 year ago

Are you using a fresh install of rethinkdb?

Some context would be helpful....

harsha448 commented 1 year ago

Below is the rethinkdb version which we are using right now.. rethinkdb 2.4.2 (GCC 4.8.5)

We are encountering same error whether i try to use restore command or after extracting the backup dump file and running import command

lsabi commented 1 year ago

And do your tables have the needed columns?

Do also the "internal" tables have those columns?

harsha448 commented 1 year ago

Yes we do have primary key for the table..Even when i tried with import command ,passing the primary key facing the same error.

lsabi commented 1 year ago

Does the problem occur even with https://github.com/BOOMfinity/GoThink ?