Detail
Why does a restore job fails on Aerospike Backup Service with the following error in the logs:
invalid token, read
Sample error line from backup service logs:
backup.error="failed to restore: failed to process batch: failed to convert readers to read workers: failed to create Decoder: error while reading header: invalid token, read (\xb5/\xfdD\x00\r, expected Version"
Answer
The likely scenario is the backup was taken with compression enabled but the restore is being done without explicitly setting the correct compression algorithm.
The solution is to specify the correct compression algorithm in the restore CR on the Aerospike Backup Service:
policy:
compression:
mode: ZSTD