EBS Backups on AWS

Bubacarr Jallow

In this blog post, we are going to discuss how to effectively backup and restore your Data on SoftNAS running in AWS. AWS EBS Backups have always been significant daily activity on every organization’s plan to protect against missioncritical data loss due to unforeseen circumstances like failed hardware or accidental deletion. 

There are two types of Backups that one can use to accomplish this goal in AWS.

  1. EBS Backup & Restore
  2. AMI backups AWS

AWS Backup is a fully managed service that makes it easy to centralize and automate data protection across AWS services, in the cloud and on-premises. Using this service, you can configure backup policies and monitor activity for your AWS resources in one place.

AWS EBS Backup & Restore:

By utilizing the native EBS snapshots feature on AWS, SoftNAS has made it relatively easy to take consistent backups of your ZFS pool(s) from the SoftNAS UI with just a click of a button!  

This type of backup allows you to periodically take backups of your entire ZFS pool(s) by taking snapshots of the underlying EBS Volume(s) that made up the SoftNAS pool(s)  either by going through the UI or running  a cron job from CLI (more on this below) to automate the process

To access this tool, you can head over to the SoftNAS UI under Settings >> Administrator >> EBS Backup and Restore >> Create, to create your first backup. From the screen below, notice that we created our first backup on pool1 using the steps above 

To create a cron job to automate the process, you can follow the instructions here.

Scheduling EBS Snapshots Using Crontab

If using a backup strategy that involves EBS snapshots, the 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 softness-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 ” AWS EBS Backups 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.

A step-by-step guide using IAM policy:

  1. Make sure that you are using the SoftNAS_HA_IAM role and it is attached to your SoftNAS instance.
  2. 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):
  3. “crontab -e” to edit the crontab.
  4. Add this line: “0 */8 * * *  softnas-cmd login softnas <password> && softnas-cmd ebs_backup create > /dev/null 2>&1 

A step-by-step guide using AWS Managed KMS Keys:

  1. 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):
  2. “crontab -e” to edit the crontab.
  3. Add this line: “0 */8 * * * softnas-cmd login softnas <password> && softnas-cmd ebs_backup create ‘<yourAccessKey>’ ‘<yourSecretKey>’ > /dev/null 2>&1”

AMI backups AWS:

This type of backup allows an entire system backup with all its current configuration and data volumes. It is especially useful when you have a failed/unrecoverable instance, and you need to replace it as quickly as possible with all its data and configuration in place.

To create this type of backup, you can head over to the AWS Console >> EC2 Dashboard >> Instances >> Select the instance you want to make a backup of >> Actions >> Image >>  Create Image to get started. Here you can define the Name of your Image (Image Name), A brief description of the Image (Image Description), and No reboot, this option is significant to ensure that the backup Image is free of IO errors. Therefore, we recommend not checking this box to allow the system to be shut down before the backup is taken

To restore to the AMI backup, we can navigate to Ec2 Dashboard >> Expand Images >> AMIs >> Select your AMI and click Launch. Please refer to the screenshots below for visual

Once the deployment process is complete, you should have a new SoftNAS instance will all your data at the time of the AMI backup!

SoftNAS is designed to support a variety of market verticals, use cases, and workload types. Increasingly, SoftNAS NAS deployed on the AWS platform to enable block and file storage services through Common Internet File System (CIFS), Network File System (NFS), Apple File Protocol (AFP), and Internet Small Computer System Interface (SCSI).  

SoftNAS AWS NAS Storage

SoftNAS is a software-defined AWS NAS delivered as a virtual appliance running within Amazon EC2. Provides NAS capabilities suitable for enterprise storage, including Multi-Availability Zone high availability with automatic failover in the Amazon Web Services (AWS) Cloud.

SoftNAS offers AWS customers an enterprise-ready NAS capable of managing your fast-growing data storage challenges including AWS Outpost availability. Dedicated features from SoftNAS deliver significant cost savings, high availability, lift and shift data migration, and a variety of security protection.

Subscribe to Buurst Monthly Newsletter 


More from Buurst