FAQ - Can Aerospike backups be stored in Amazon S3?
When running an Aerospike cluster on Amazon Web Services is it possible to take backups via Aerospike Tools and store these backups on Amazon S3?
Yes, it is possible to store Aerospike backups on Amazon S3 however experience has demonstrated that this is best confined to either smaller datasets or development instances. Production instances, where datasets and backups tend to be larger, take longer to move to S3 and as such are more vulnerable to network interruptions which cause the process to fail.
The process to take the backups is very simple.
- Take a normal backup via asbackup
- Use a utility or api to upload into S3.
- Example utility and api: s3cmd, aws cli
These steps can be combined into a single command:
asbackup [...] --output-file - | gzip -9 | s3cmd put - s3://BUCKET/FILE
Restoring the files is also a simple process.
- Download the backup file from S3 onto a system with asrestore.
- Use asrestore to restore the data back into a cluster.
cat BACKUP.GZ | gunzip | asrestore [...] --input-file -
It is recommended to set IAM Roles on instances that perform the backups so that S3 credentails are not saved. Aerospike credentials are still required if using authentication.
BACKUP RESTORE AWS S3 S3CMD
January 21st 2019