/
Scheduling EBS Snapshots Using Crontab
Scheduling EBS Snapshots Using Crontab
If using a backup strategy that involves EBS snapshots, best practice is to schedule a cron job that leverages the EBS Backup and Restore features of SoftNAS.
We now make this script available to you via the softnas-cmd API. The script will store the snapshots in your AWS account under the EC2 Snapshots console and they will also be seen in the SoftNAS Storage Manager console in the "EBS Backup and Restore" tab. Please note that the retention policy has now been removed and you can create as many EBS snapshots as you want. You also have the ability to manually clean up old EBS snapshots from the UI.
Step-by-step guide using IAM policy:
- Make sure that you are using the SoftNAS_HA_IAM role and it is attached to your SoftNAS instance.
- As the 'root' user, schedule the below cron. For this example, we will use every 8 hours for the snapshot interval (*/8 in the hourly place holder):
- "crontab -e" to edit the crontab.
- Add this line: "0 */8 * * * softnas-cmd login softnas <password> && softnas-cmd ebs_backup create > /dev/null 2>&1"
Step-by-step guide using AWS Managed KMS Keys:
- As either 'root' or 'ec2-user', schedule the below cron. I'm using every 8 hours for my snapshot interval (*/8 in the hourly place holder):
- "crontab -e" to edit the crontab.
- Add this line: "0 */8 * * * softnas-cmd login softnas <password> && softnas-cmd ebs_backup create '<yourAccessKey>' '<yourSecretKey>' > /dev/null 2>&1"
Related articles
, multiple selections available,
Related content
Restoring EBS Snapshots Created by the "EBS Backup and Restore" tool
Restoring EBS Snapshots Created by the "EBS Backup and Restore" tool
More like this
Configuring Consistent Backup and Restore
Configuring Consistent Backup and Restore
More like this
Managing Schedules
Managing Schedules
More like this
Snapshots in StorageCenter
Snapshots in StorageCenter
More like this
Creating a Snapshot of the root volume in AWS
Creating a Snapshot of the root volume in AWS
More like this
Snapshot Best Practices
Snapshot Best Practices
More like this