Earlier this week, I showed you a way to set up a Jira and Confluence server in minutes, and how to customise its URL.
Today, I’m going to show you how to back up the data on your Instant Atlassian server in a matter of seconds, and how to restore from your backup in the event of a mishap. So, grab yourself a $5 license while you still can, and read on…

Backing up your data

Using the same Instant Atlassian tool we used in my previous posts, run the following command:

java -jar instant-atlassian-1.1.jar "Your_AWS_Access_Key_ID" "Your_AWS_Secret_Access_Key" backup Your_EBS_Volume_ID

This command will complete in a few seconds. Make a note of the EBS Snapshot ID it gives you, as you will need this later.
Amazon will charge you to keep a backup in storage. Their current rate is 15 cents per gigabyte per month, so a 10 gigabyte backup will cost you $1.50 per month. The storage charges continue until you delete the backup (see below).

Restoring from a backup

If you’re lucky, you’ll never need this step. But occasionally things do go wrong, so you’d best keep a note of how to restore the backup you’ve just made.
To restore your backup, use the following command:

java -jar instant-atlassian-1.1.jar "Your_AWS_Access_Key_ID" "Your_AWS_Secret_Access_Key" restore Your_EBS_Snapshot_ID Your_Domain_Name_or_IP_Address

If you’re not using a custom URL, leave off the final parameter.
This will create a new server, with a new EBS Volume ID. It will be populated with data restored from the backup having the specified EBS Snapshot ID.
If the old server still exists, and you have no further use for it, don’t forget to use the “delete” command I described in part 1 to dispose of it, otherwise Amazon will continue to charge you for it.

Deleting old backups

Once a backup has outlived its useful life you will want to delete it, so that you are no longer being charged for its storage.
For this, use the “delete_backup” command:

java -jar instant-atlassian-1.1.jar "Your_AWS_Access_Key_ID" "Your_AWS_Secret_Access_Key" delete_backup Your_EBS_Snapshot_ID

Backup strategies

With these three commands, you can come up with a backup strategy that meets your needs. You’ll need to decide how frequently to take backups, and how long to keep them.
Consider the possibility that an individual backup may be lost or faulty, or that data loss may be undetected for some time. For these reasons, it’s wise to keep multiple backups in storage simultaneously.

Next time

In my next post, I’ll let you know how you can significantly lower your EC2 hosting costs by making up-front lump sum payments.
Make sure you grab your $5 license before then, as time is running out!

Instant Atlassian part 3: Instant Backup and Restore