FAQ Are incremental backups possible within Aerospike?


#1

FAQ: Are incremental backups possible within Aerospike?

The Aerospike backup tool allows for backups to be taken by namespace, set, and as of version 3.12 it is possible to configure a predicate filter based on the Last Updated Time timestamps to do incremental backups.

Details

Timestamps can be specified so only records updated before/after timestamp X are backed up. An operational routine can be established to do incremental daily backups using the asbackup –modified-after option.

asbackup options and timestamp format

Option Date Format Description Version
modified-after YYYY-MM-DD_HH:MM:SS Backup data with last-update-time after the specified date-time. The system’s local timezone applies. 3.12 and above.
modified-before YYYY-MM-DD_HH:MM:SS Backup data with last-update-time before the specified date-time. The system’s local timezone applies. 3.12 and above.

Example

1 record was inserted on in namespace test and set demo on 08/18/2017.

# asbackup --host 127.0.0.1 --namespace test --set demo --directory backup_2017_08_18 --modified-before '2017-08-17_00:00:00' -r
2017-08-18 23:03:56 GMT [INF] [ 1559] Starting 100% backup of 127.0.0.1 (namespace: test, set: demo, bins: [all], after: [none], before: 2017-08-17 00:00:00 PDT) to backup_2017_08_18
2017-08-18 23:03:56 GMT [INF] [ 1559] [src/main/aerospike/as_cluster.c:96][as_cluster_add_nodes_copy] Add node BB9117BC5005452 127.0.0.1:3000
2017-08-18 23:03:56 GMT [INF] [ 1559] [src/main/aerospike/as_cluster.c:96][as_cluster_add_nodes_copy] Add node BB9DB3754005452 192.168.100.242:3000
2017-08-18 23:03:56 GMT [INF] [ 1559] [src/main/aerospike/as_cluster.c:96][as_cluster_add_nodes_copy] Add node BB9AC3883005452 192.168.100.207:3000
2017-08-18 23:03:56 GMT [INF] [ 1559] Processing 3 node(s)
2017-08-18 23:03:56 GMT [INF] [ 1559] Node ID             Objects        Replication    
2017-08-18 23:03:56 GMT [INF] [ 1559] BB9117BC5005452     0              2              
2017-08-18 23:03:56 GMT [INF] [ 1559] BB9DB3754005452     1              2              
2017-08-18 23:03:56 GMT [INF] [ 1559] BB9AC3883005452     1              2              
2017-08-18 23:03:56 GMT [INF] [ 1559] Namespace contains 1 record(s)
2017-08-18 23:03:56 GMT [INF] [ 1559] Directory backup_2017_08_18 prepared for backup
2017-08-18 23:03:56 GMT [INF] [ 1578] Starting backup for node BB9117BC5005452
2017-08-18 23:03:56 GMT [INF] [ 1579] Starting backup for node BB9DB3754005452
2017-08-18 23:03:56 GMT [INF] [ 1578] Created new backup file backup_2017_08_18/BB9117BC5005452_00000.asb
2017-08-18 23:03:56 GMT [INF] [ 1579] Created new backup file backup_2017_08_18/BB9DB3754005452_00000.asb
2017-08-18 23:03:56 GMT [INF] [ 1580] Starting backup for node BB9AC3883005452
2017-08-18 23:03:56 GMT [INF] [ 1580] Created new backup file backup_2017_08_18/BB9AC3883005452_00000.asb
2017-08-18 23:03:56 GMT [INF] [ 1578] Backing up 6 secondary index(es)
2017-08-18 23:03:56 GMT [INF] [ 1578] Skipped 1 index(es) with unwanted set(s)
2017-08-18 23:03:56 GMT [INF] [ 1578] Backing up 0 UDF file(s)
2017-08-18 23:03:56 GMT [INF] [ 1578] Completed backup for node BB9117BC5005452, records: 0, size: 218 (~0 B/rec)
2017-08-18 23:03:56 GMT [INF] [ 1579] Completed backup for node BB9DB3754005452, records: 0, size: 29 (~0 B/rec)
2017-08-18 23:03:57 GMT [INF] [ 1580] Completed backup for node BB9AC3883005452, records: 0, size: 29 (~0 B/rec)
2017-08-18 23:03:57 GMT [INF] [ 1577] 0% complete (~0 KiB/s, ~0 rec/s, ~0 B/rec)
2017-08-18 23:03:57 GMT [INF] [ 1577] Backed up 0 record(s), 6 secondary index(es), 0 UDF file(s) from 3 node(s), 276 byte(s) in total (~0 B/rec)

# asbackup --host 127.0.0.1 --namespace test --set demo --directory backup_2017_08_18 --modified-after '2017-08-17_00:00:00' -r
2017-08-18 23:04:17 GMT [INF] [ 1586] Starting 100% backup of 127.0.0.1 (namespace: test, set: demo, bins: [all], after: 2017-08-17 00:00:00 PDT, before: [none]) to backup_2017_08_18
2017-08-18 23:04:17 GMT [INF] [ 1586] [src/main/aerospike/as_cluster.c:96][as_cluster_add_nodes_copy] Add node BB9117BC5005452 127.0.0.1:3000
2017-08-18 23:04:17 GMT [INF] [ 1586] [src/main/aerospike/as_cluster.c:96][as_cluster_add_nodes_copy] Add node BB9DB3754005452 192.168.100.242:3000
2017-08-18 23:04:17 GMT [INF] [ 1586] [src/main/aerospike/as_cluster.c:96][as_cluster_add_nodes_copy] Add node BB9AC3883005452 192.168.100.207:3000
2017-08-18 23:04:17 GMT [INF] [ 1586] Processing 3 node(s)
2017-08-18 23:04:17 GMT [INF] [ 1586] Node ID             Objects        Replication    
2017-08-18 23:04:17 GMT [INF] [ 1586] BB9117BC5005452     0              2              
2017-08-18 23:04:17 GMT [INF] [ 1586] BB9DB3754005452     1              2              
2017-08-18 23:04:17 GMT [INF] [ 1586] BB9AC3883005452     1              2              
2017-08-18 23:04:17 GMT [INF] [ 1586] Namespace contains 1 record(s)
2017-08-18 23:04:17 GMT [INF] [ 1586] Directory backup_2017_08_18 prepared for backup
2017-08-18 23:04:17 GMT [INF] [ 1605] Starting backup for node BB9117BC5005452
2017-08-18 23:04:17 GMT [INF] [ 1607] Starting backup for node BB9DB3754005452
2017-08-18 23:04:17 GMT [INF] [ 1605] Created new backup file backup_2017_08_18/BB9117BC5005452_00000.asb
2017-08-18 23:04:17 GMT [INF] [ 1606] Starting backup for node BB9AC3883005452
2017-08-18 23:04:17 GMT [INF] [ 1607] Created new backup file backup_2017_08_18/BB9DB3754005452_00000.asb
2017-08-18 23:04:17 GMT [INF] [ 1606] Created new backup file backup_2017_08_18/BB9AC3883005452_00000.asb
2017-08-18 23:04:17 GMT [INF] [ 1605] Backing up 6 secondary index(es)
2017-08-18 23:04:17 GMT [INF] [ 1605] Skipped 1 index(es) with unwanted set(s)
2017-08-18 23:04:17 GMT [INF] [ 1605] Backing up 0 UDF file(s)
2017-08-18 23:04:17 GMT [INF] [ 1607] Completed backup for node BB9DB3754005452, records: 0, size: 29 (~0 B/rec)
2017-08-18 23:04:17 GMT [INF] [ 1605] Completed backup for node BB9117BC5005452, records: 0, size: 218 (~0 B/rec)
2017-08-18 23:04:17 GMT [INF] [ 1606] Completed backup for node BB9AC3883005452, records: 1, size: 132 (~132 B/rec)
2017-08-18 23:04:18 GMT [INF] [ 1604] Backed up 1 record(s), 6 secondary index(es), 0 UDF file(s) from 3 node(s), 379 byte(s) in total (~379 B/rec)



FAQ - Common asbackup and asrestore questions