I’ve encountered strange error: database created by import has incomplete number of rows compared to original database.
For instance only 58 rows of 64.
cockroach dump --insecure users > users.sql
cockroach sql --insecure --database users < ~/users.sql
have you been able to identify the missing rows?
can you check that the
.sqlfile contains all the 64 rows? (We want to determine whether the problem occurred during
dumpor the import
which version of CockroachDB are you using?
Thank you in advance
- Yes, it’s last 6 rows
- Yes it contains 64 rows
- v 2.0.4
Thank you, this helps.
I have two more questions, I want to be sure that all the data is sent to the server:
could you run again the import command but add
in the output, can you check that all the SQL commands are sent successfully to the server?
after the command completes, enter
echo $?in your shell to get the exit code. Is it zero? (to mean, did the last SQL statement get executed)?
Thank you again
For reference this seems suspicious so I filed bug https://github.com/cockroachdb/cockroach/issues/28137 on your behalf.
However to further investigate this it would really help if you could share the generated
users.sql file with us. If there is any sensitive data in there, perhaps you can reproduce the problem by replacing the sensitive data. If not we can arrange for you to communicate the file to us in a confidential manner.
A simple and naive question:
- I see your dump command redirects with
- but the import is done with
Are you using the same
users.sql file in both cases? Is the first command equivalent to
OMG, it’s really the problem of loading wrong file ))
Thank you very much for pointing it out. And sorry for disturbing.
No problem, happy to help!