Did you use the asbackup and asrestore from the same tools package? Which version of the tools / asbackup did you use? There were changes around sindex backup file format. I noticed this Jira:
[TOOLS-2263] - (ASBACKUP) Backup file format changed for sindexes starting in asbackup 3.12.0.
That is addressed in the 8.0.2 tools package. But from the error message described, I am not sure this is related to your issue… If urgent, you can always recreate the sindex manually but if you provide the version details for asbackup or the tools package used, we could check to see whether there are some known compatibility issues.
Ah… didn’t realize this. Not sure if backing up with the asbackup that shipped with 4.5 and restoring with the asrestore that shipped with 6.2. This may still not work, I am not sure, and may not be practical to try. Let me see if I figure something internally… (just for reference, I have opened an internal Jira: TOOLS-2338).
the data restore seems to be working fine. facing issues only with index restore. Please let me know if we need to be cautious around data restore as well.
Looks like the issue is a combination of a change in the info protocol between 3.x servers, 6.x, and the way old asrestore parses secondary index info responses. When asrestore restores secondary indexes it makes this info request to the target server sindex-list:ns=<namespace> it compares the results to the secondary indexes in the backup file to make sure it isn’t overwriting an identical version of the sindex. The code for parsing that info response in asbackup 3.2.9 is case sensitive. Newer tools including asbackup 3.14.0 (current newest) are case insensitive. Looking at the info response between server 4.8.0.13 and 6.2.0.2 we see…
The case difference at “type” means that when we run asrestore 3.2.9 against server 6.2.0.2 the sindex parsing code fails because of case sensitivity with [ERR] [ 11] Invalid path type string .
Using a recent asbackup (3.14.0) with the old backup files should work fine and works for me.
% asrestore -d TOOLS-2338 -n test -h 127.0.0.1:3003
2023-01-25 18:41:49 UTC [INF] [73702] [src/main/aerospike/as_cluster.c:202][as_cluster_add_nodes_copy] Add node BB9030011AC4202 127.0.0.1:3003
2023-01-25 18:41:49 UTC [INF] [73702] [src/main/aerospike/as_cluster.c:202][as_cluster_add_nodes_copy] Add node BB9030011AC4202 127.0.0.1:3003
2023-01-25 18:41:49 UTC [INF] [73702] Starting restore to 127.0.0.1:3003 (bins: [all], sets: [all]) from TOOLS-2338
2023-01-25 18:41:49 UTC [INF] [73702] Processing 1 node(s)
2023-01-25 18:41:49 UTC [INF] [73702] Found 1 backup file(s) in TOOLS-2338
2023-01-25 18:41:49 UTC [INF] [73702] Restoring records
2023-01-25 18:41:49 UTC [INF] [73739] Restoring TOOLS-2338/BB9020011AC4202_00000.asb
2023-01-25 18:41:49 UTC [INF] [73739] Opened backup file TOOLS-2338/BB9020011AC4202_00000.asb
2023-01-25 18:41:50 UTC [INF] [73702] Skipped 2 matched index(es)
2023-01-25 18:41:50 UTC [INF] [73738] 0 UDF file(s), 2 secondary index(es), 72087 record(s) (129188 rec/s, 12237 KiB/s, 97 B/rec, retries: 0)
2023-01-25 18:41:50 UTC [INF] [73738] Expired 0 : skipped 0 : err_ignored 0 : inserted 206: failed 71881 (existed 0 , fresher 71881)
2023-01-25 18:41:50 UTC [INF] [73738] 100% complete, ~0s remaining
For completeness here is the sindex portion of my backup file from the old server.
Version 3.1
# namespace test
# first-file
* i test demo idx_foo N 1 foo S
* i test demo idx_bar N 1 foo N