Azure Website 101 : Backup your Website and its content

Before jumping into the ‘HOW TO’ process let me tell you ‘WHY’ this feature is actually important. Lets start from a customer point of view. One sunny morning you went to ATM booth and you found you don’t have a any credit on your account. You ran for the bank and once you reached there you saw lots of people were already there and they also came there for similar issues. The bank gave a statement saying that because of hardware failure all data were corrupted. And there is nothing they can do RIGHT NOW since they don’t have everyone’s financial documents on hard copy! As a valued customer you will be surely dissatisfied from this sorts of occurrence/service. From bank’s point of view, its a nightmare. Big enterprise like bank, factory already facing the daunting truth : without customers data, they have no business. That’s why it’s so critical to now have a modern and dependable system in place to safeguard valuable business information.  One of the way to safeguard valuable business information is through Backup. Backup actually involves the storing of data from one place to another location. If there is ever any loss of data on your primary device, you still have a copy of those data in another location that you can restore in your oops moment.

With the introduce of Azure Website Backup life gets much more easier. Now, you can easily backup your web app contents, database even your configuration as well. To do so, lets first visit the new azure portal and log in with your credential. After that browse the Web Apps section and point out the web app that you want to backup.

Azure Website 101_Backup_01

Clicking the Settings button will open a new blade from where you select Backups section .

Azure Website 101_Backup_02.jpg

The Backup and Restore feature requires the site to be in Standard mode! So that means if your web app currently has any other hosting plan as selected one you have to upgrade it to STANDARD mode. 

The following figure shows the Backup Configuration section. Azure backup actually came with a greatest flexibility in mind. It supports two kind of backup process. You can either go for Automatic Backup or  Manual Backup. 

Frequency: How often you would like to take backup. The number of days must be between 1 and 90, inclusive (from once a day to once every 90 days).

Start Date: Specify the time from when you want to start your automatic backup. You can specify the date and time even you can set the time zone.

Retention : Number of days you wish to retain the backup.

Azure Website 101_Backup_04.jpg

Included DB: These are the databases that are from connection string of your WebConfig file. Please note, Currently Azure Website Backup support only SQL DB and MySQL database.

Azure Website 101_Backup_05.jpg

Penny Saving Tricks : Pick a storage account that is close to your website in order to avoid round trip. If you happen to choose a storage account that is in different region you will be charged for egress traffic. If you cleverly pick them on the same region you will not be charged a single penny!

Figuring out the location where your webapp are currently running is that easy. Expand the “Essential” panel just right below the setting. 

Azure Website 101_Backup_03.jpg

From the figure you can see that the site that we are planning to backup are currently running on Southeast Asia. So, to save money you have to select storage account that are also in the same region, In our case Southeast Asia.

Once you are good to go with your backup configuration  settings, next thing you have to do is to select your storage account. If you do not yet have a storage account, you can create one by clicking the Storage Account in the Backups blade. Finally choose a container  for holding your backup file. If you don’t have one you can always create one by providing required info after clicking “Create a new container”.  Here I am creating one with the name “backuptest”

Azure Website 101_Backup_06.jpg

NOTE: The Backup and Restore feature requires an Azure storage account and container that must belong to the same subscription as the web app that you are going to back up.

From the Backups blade click “Backup Now” , alternatively you can also right click your storage account which is under ‘backup destination’ section

Azure Website 101_Backup_07.jpg

Depending on the size of your content it might take max few minutes. In order to check your backup contents navigate to your Storage Account first.

Azure Website 101_Backup_08.jpg

From the summary section click the Containers and you will see your last created container list.

Azure Website 101_Backup_09.jpg

Dig inside your container and will see two types of file i.e ZIP and XML. The real good part of Azure Backup is that Azure allows you download this .ZIP file which is good because some time there might be situation where you don’t want to restore the entire backup rather you want to restore a particular file or folder from your backup. Another file that is generated during backup is .XML file. This is even handy because some time you might only want to see what are the files that you have up and running on your directory. The file name follows the convention of putting your site name first then a time stamp.

Azure Website 101_Backup_10.jpg

Penny Saving Tricks : If you are not planning to take regular automated backup policy ON then scale down your site to previous state once you are done with backup! This  helps you to move you back down into the lower billing range that you were comfortable with.

To save money, you might want to take partial backup which would be a penny saving trick indeed, but take at least one FULL BACKUP of the site first so that you have all your site’s contents backed up (this is worst case scenario planning).

Inside Azure Web Site Backup zip folder

Following are some of the file, folder structure that will you find inside of your zip file.

FSFS stands for File System. This retains a snapshot of the file system of your web site at the time the backup was taken. This includes both the site and logFiles folders so you have access to anything you would need.
Temp – Temporary folder.
Meta – This is an xml file which describes all aspects of your website including but no limited to Custom Domains, Configured SSL Certificates, App Settings, Connection Strings, Default Document settings, Handler Mappings (for custom FastCGI Handlers); Remote Debugging, Web Sockets.  if it’s something you set in the portal for your web site, it’s backed up in this file.
Database Name – This can be used to completely restore my database from schema to data.

Thats all for today. In next post I will show how to restore your database.

Advertisements

One thought on “Azure Website 101 : Backup your Website and its content

  1. Pingback: Azure Website 101: Its time to RESTORE your content ! | LearnWithShahriar

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s