Reputation: 1018
When restoring a backup of a cluster (3.8.2.3) into the same cluster, secondary indexes get deleted :
show indexes Namespace
gives 36 rows
cat Backup-Namespace.abs.gz | gunzip | asrestore --input-file - --no-records
show indexes Namespace
gives 0 rows
And if I restore once again with the same command
show indexes Namespace
gives 36 rows
Same result for the option --replace
, --unique
It works for --no-generation
option, but as I would like the the lastest data, I don't want to use this option.
Note that the backup was created with :
asbackup --no-udfs --priority 1 --namespace Namespace --output-file -
To solve this problem I create indexes by hands where there are new ones, and I use --no-indexes
for asrestore
to update my data.
Am I doing something wrong ?
Upvotes: 2
Views: 177
Reputation: 2939
You are doing things right. This is an issue with the current asrestore tool. The asrestore tool first drops the indices from the backup using the C client's asynchronous API and doesn't wait for completion before attempting to re-create those same indices. This will cause the re-creation to often fail (since those indices still exist and are still being deleted).
Using the --wait option on the restore should help. And keep an eye for Jira TOOLS-608 in a soon to come Tools package release for some enhancements regarding this odd behavior.
Upvotes: 3