Backup/Restore and Disaster Recovery are a couple of the most popular use cases for the cloud. With the Jamcracker platform, you can use snapshot and image mgmt capabilities with schedule based policies to provide rapid recovery for failed applications or corrupted data.
In this blog we will walk through a scenario using Image Management and Volume Snapshots to support a backup and recovery plan for a classic enterprise application.
Such storage designs allow you to have separate maintenance plans that are appropriate for the data. For example, it would be pretty inefficient to take frequent backups of an operating system and application volume since it does not change very often. However, the data that the application produces can change very rapidly, so the frequency of data backup would be higher than backing up the application itself.
In the scenario we will walk through, we want to be able to quickly recover from any OS or application error or corruption, as well as protect against any accidental (or intentional) data corruption.
Note: This article assumes that the user’s role has appropriate privileges defined under Manage ->Roles and Privileges.
You will them be prompted to enter a Name and Description for the Image. Enter the information and click the Create button.
The Image creation will begin, and you can see the Status under Manage – Images:
Under Manage – Policies, click the Add Policy icon.
In the screen that appears, enter the Name and Description, and in the Policy For field, select Instance.
Select Calendar for the Using field, Specify your recurring frequency (e.g. Monthly) and specify the Time and Day of Month that the image should be created.
Last select Create Image for the Action field, and then click Save & Finish. Your monthly VM image backup policy is now set.
To Tag an Instance, visit the Manage – Instance screen, and locate the Instance that you want the policy to act on. Hover over Action and select View Details.
In the View Details screen, click on the Tags tab, and then enter the tags you want to apply to the instance, then click Save.
Repeat this for all Instances that need this monthly backup
Once you have used the Jamcracker platform to launch your application servers, find the instance (in the Instances screen, under Manage -> Instances) which will mount the data volume.
Once you located the VM instance of interest, click on the Actions link to show instance options, then select the Attach New Volume option.
Define your volume Name, Type and Size and then click Create.
Note: Your volume type may have different fields (e.g. Volume Type may be Magnetic, SSD, Tier 1 etc.) than shown here, depending on how your particular instance was deployed.
Within a couple of minutes, your data volume will be available to your application, as shown below:
To define the Tag for the instance, in the Manage - Instances screen, click on the Actions link to uncover options, and the select View Details.
Then switch to the Tags tab, then add the new tag Name and value (In this case we will add VolBackupFreq = Daily tag) and click Save.
You are now ready to define the volume backup policy.
Now enter the Name of the Policy, a Description, and select the Volume option under Policy For dropdown.
Once you select Volume, additional options appear.
Enter the Tag name and value in the Filter By fields, select Calendar for the Using option, select the Recurrence value (e.g. Daily), and the Time of day that you want it to occur, then select Create Snapshot for the Action option, and click Save & Finish at the bottom of the window.
You are now finished defining the Policy that will run a Volume Snapshot on all volumes attached to VM Instances with the selected Tags, according to the schedule you specified.
First, launch your Application again using the usual AppStack Launch functionality, or, if you backed up the instance to an image, you can visit the Manage – Instances screen, find the Image that you want to use, and then hover over Action and select Create Instance.
Next, you need to create a new volume from the desired volume snapshot. To do this, go to Manage ->Volume Snapshots, find the snapshot that was last created by the policy. The snapshot will be named "Snapshot for VOLNAME_ID" (where VOLNAME is the volume name and ID is a unique identifier).
Find the snapshot with the latest Created On date assuming you want the latest snapshot, and then click the Create Volume link under the Snapshot name. You will need to give this volume a new Volume Name, while the Type and Size values are preserved from the original volume.
The last step is to attach the volume to the new Application instance. Under Manage-Instances, select the VM instance that needs the volume, then right click on Actions and select Attach Existing Volume.
Then select the restored volume from the list by clicking the checkbox, and click Done.
Within a few minutes, the backup data volume will be attached to the virtual machine instance.
Have a comment or question regarding this post? Contact us.