Automatic backup and restore of Aerospike namespaces

engrmahabub
Mahabubur Rahman
Published on Sep, 13 2023 1 min read 0 comments
image

Aerospike Database is a flash memory and in-memory open source distributed key value NoSQL database management system, marketed by the company also named Aerospike

If you need to backup and restore aerospike namespace automatically. You can try writing a bash script with the backup and restore commands in it.  Set the script to automatically run after every 30 days in Linux crone tab.

#!/bin/bash
#Backup:
asbackup -h localhost -n test  -d /home/asif/aerobckups -r

#Restore:
asrestore -d /home/asif/aerobckups

If you run this bash file it will backup aerospike namespace first then restore the backup.

Now you need to set it in crone tab so it will execute after expected day. In the example it set it to every 4 week -  

0 0 * * 4 /home/ramesh/backup.sh

 

 

0 Comments