Problem Description
While setting up Aerospike Backup Service (ABS), the following error was observed in the restore file.
"error": "failed to restore routine dailyLocalBackupRoutine, namespace test by timestamp: restore failed: failed to process data: invalid namespace test (expected: abc)"
The Restore API configuration was as follows:
"policy": {
| "no-generation": true,
| "namespace": {
| "destination": "xyz",
| "source": "abc"
| },
| "compression": {
| "level": 1,
| "mode": "ZSTD"
| }
| },
| "routine": "dailyLocalBackupRoutine",
| "time": <timestamp>
| }
Backup information for a specific timestamp:
"dailyLocalBackupRoutine": [
{
"namespace": "abc",
"key": "dailyLocalBackupRoutine/backup/<timestamp>/data/abc",
},
{
"namespace": "test",
"key": "dailyLocalBackupRoutine/backup/<timestamp>/data/test",
}
Explanation
From the above information, it is evident that restore process is treating all namespaces associated with the same routine (dailyLocalBackupRoutine) and timestamp (<timestamp>) as part of the restore, even though a specific namespace mapping ("source": "abc" → "destination": "xyz") was explicitly defined in the restore request.
Solution
As a part of the solution, we recommend configuring separate routines for each namespace, as outlined in the reference documentation. For example:
-
dailyLocalBackupRoutine_abc -
dailyLocalBackupRoutine_test
In addition, the key should be updated to distinguish between namespaces.
For example:
Before:
"key": "dailyLocalBackupRoutine/backup/<timestamp/data/testns"
After:
"key": "dailyLocalBackupRoutine_test/backup/<timestamp>/data/test"