Skip to content
Webinar - May 13th: How Criteo powers real-time decisions with a reduced footprintRegister now

Backup and Recovery in AWS

AWS provides alternative methods for backing up your data. This document will detail the general methodology and the options available.

Aerospike tools

Using Aerospike tools is the simplest method for backing up and restoring data.

Backup

  1. Take a normal backup using asbackup
  2. Move the file to a safe location

Restore

Upload the backup file to a system with asrestore. Use asrestore to restore the data back into a cluster.

cat BACKUP.GZ | gunzip | asrestore [...] --input-file -

Benefits

  • Simplest
  • Cheapest
  • Contains SMD data

Drawbacks

  • Long duration
  • Additional server load while running
  • All or nothing across the cluster

EBS snapshots

If you are using persistence, either through EBS directly, or using shadow device(s), you can take advantage of EBS snapshots. EBS snapshots are point-in-time backups of data. This is done at the data block level, transparent to the application (Aerospike).

Backup

To create a backup, simply initiate snapshots on your EBS data volumes.

Restore

If your backups were taken using EBS snapshots, you must deploy those snapshots into EBS volumes. After provisioning your replacement EBS volumes, configure the replacement instance exactly as the failed instance had been configured.

This means that EBS volumes are mounted at the same locations and the same number of ephemeral drives are provisioned.

Benefits

  • Quick
  • Minimal impact
  • Individual node based

Drawbacks

  • More costly
  • Additional scripting/coordination required
  • Does not account for SMD

Instance failure

If you are using EBS for persistence and your instance fails, you can detach the EBS volume from the failed instance and then attach it to a replacement instance.

  1. Remove/Terminate the failed instance, but keep the EBS volume.
  2. Deploy a new Instance, with the same private IP as the old instance in the same zone.
  3. Attach EBS volume from Step 1 to the replacement instance.
  4. Restore the config to the replacement node and restart the node.

Once the node rejoins the cluster, migrations will occur and data will be rebalanced.

Feedback

Was this page helpful?

What type of feedback are you giving?

What would you like us to know?

+Capture screenshot

Can we reach out to you?