Manage Virtual Server Backups

is document provides the information how backups are implemented and managed in OnApp and aims at helping to design and manage the backup strategy for your cloud.

If required, you can change the block size which is used during backup creation at Control Panel > Settings > Configuration by editing the Block Size (MB) parameter.


Types of Backups


OnApp allows you to create two backup types: normal and incremental. 

Normal Incremental
The full copy of target data that is stored in an archive, whether it has changed or not. Only the changes made after the last backup are archived instead of backing up the whole target.
Accessed at Dashboard > Virtual Servers > VS labelBackups > Images Accessed at  Dashboard > Virtual Servers > VS label > Backups > Files
Auto-backups are created per disk. Auto-backups are created per virtual server.

The backup type is configured at Settings > Configuration > Backups/Templates menu. If you tick the Allow incremental backups checkbox, the incremental backups will be enabled for your cloud. Otherwise, if this box is disabled, normal backups will be created for your cloud.


How Do Incremental Backups Work?



Incremental backups only copy files that have changed since the last backup. The benefit is that incremental copies take less space than full backups. Be aware that when you want to perform a complete restore, the most recent full backup and all of the subsequent incremental copies must be restored. 

For example, we have a disk with three files: File1 - 3Gb, File2 - 2Gb, File3 - 4Gb

  • The first backup will be a full backup of 9 GB (sum of all files). If you decide to take another incremental backup soon thereafter, the backup size will 0, as the files have not been changed since the first backup. However if your backup has complicated directory structure, it could be more than 0, as file system could store some system data.
  • If you delete File2, the target size will now be 7Gb. The subsequent incremental backup size will be 0, as new data has not been added. 

  • If you add File4 of 4 GB size, the subsequent incremental backup will equal 4 GB (the size of new data added). 

  • If you increase File3 disk size to 6 GB, the subsequent incremental backup size will equal 6 GB, although the target is increased by 3 GB. This happens because the incremental system takes the update of the existing file as the deletion of the existing file and adding the new file with the same name (the first version of File3 has been deleted and the new one with 6GB size has been added).


Backup Support by VS / Virtualization / OS



The following table shows what backups are supported by a VS depending on its type, virtualization or OS:


Normal backup

Incremental backup

Convert to template

BaremetalServer

no

no

no

EdgeServer

no

no

no

StorageServer

yes

yes

no

LoadBalancer

no

no

no

SmartServer

yes

yes

yes

KVM, XEN

yes

yes

yes

VMware

snapshot

no

no

Windows

yes

no

yes

*nix

yes

yes

yes

CloudBoot / IS

yes

yes

yes

SolidFire

yes

yes

yes



Manual / Auto-Backups



You can take backups manually or automatically. 

  • Manually - the user logs into OnApp CP and clicks the “Take backup” button when required.

  • Automatically - the user enables backup schedule (daily, weekly, monthly, yearly).  There are two types of auto-backups that supplement each other: auto-backup presets and schedules. 

Auto-backup presets are a simple way to set up an automatic backup schedule when virtual servers are created. Once configured globally for the cloud, they can be applied to a VS automatically when the Automatic Backups Required box is checked during VS creation. 
A number of preset backup time periods are available (daily, weekly, monthly and annual backups) which are configured further by specifying how often each backup is taken. So, for example, you can set up automatic backups every 2 days, every 1 month, or even every 12 months (the same as every 1 year). Each type of backup can be enabled or disabled.

Schedules are created either per virtual server or per disk depending on the backup type set in your cloud settings:

  • If you are using normal backups, the schedules are created per disk.
  • If you are using incremental backups, the schedules are created per virtual server.

Schedules allow configuring that auto-backups run for specific VSs only, at a particular date and time.

The combination of Auto-backup Presets and Scheduled VS backups provides a great deal of flexibility in the way backups are handled for the cloud, and for individual VSs. Auto-backup Presets can be applied to all new VSs added to the cloud. Scheduled VS backups enable specific backups to be scheduled for individual VSs, outside of the auto-backup pattern.

For the instructions on setting up auto-backups, refer to the following docs:



Where Backups Are Stored?



Depending on the cloud configuration and the backup scheme, the backups are stored at different locations. See the illustration below for the explanation.

Where backups are stored.

*- make sure to share the location on compute resources where backups are stored between all compute resources in a zone.

Normal:

  • If you have an SSH File transfer server configured in Settings > Configuration menu, the backups are stored on this SSH file transfer server.
  • If you have added one or more backup servers, all backups will be stored on these servers.
  • If there is more than one backup server, backups are stored on the server according to the balancing scheme.
  • If you have no backup servers in the cloud, the backups are stored on compute resources. 

Incremental:

  • If you have added one or more backup servers, all backups will be stored on these servers.
  • If there is more than one backup server, backups are stored on the server according to the balancing scheme.
  • If you have no backup servers in the cloud, the backups are stored on compute resources. 

You can also use dedicated CloudBoot backup servers in your cloud. Please refer to the Create CloudBoot Backup Server for details.


Backup Server Balancing



Backups can be saved either to a Compute resource or to a dedicated backup server. When saving a backup, the system calculates if user has enough physical/ bucket resources to save a backup in the selected destination.

When saving a backup to a Compute resource, the system does not check if Compute resource has enough disk space to save a backup  and only checks if user has enough bucket limits. When saving a backup to a dedicated backup server, the system checks both disk space and bucket limits.

The choice of a specific backup server on which a backup will be performed is called backup server balancing. When you send a command to take a backup, the system schedules a corresponding transaction and when the transaction is launched, the system will reassign it to the most appropriate backup server. 

OnApp supports two backup types: normal and incremental, each of them having its own procedure of selecting the most appropriate server to take a backup:

For Normal Backups the system will follow the sequence below to take a backup:

  1. Check which backup servers are assigned to this location group  
  2. Which of them are available to the user
  3. Which of those have enough space and bucket limits. Free disk size on a target must be at least equal to the disk’s size for which the backup is taken. 
  4. From those remaining, the most appropriate backup server will be the one with the smallest count of "take backup" transactions at the moment of the check
  5. If for several backup servers this quantity is equal (0, 1, 2, ...n), the backup server with the lowest load (highest cpu_idle parameter) will be selected as the most appropriate

In case of Incremental Backups, the server for the first full backup will be selected the same as for normal backups:

  1. Check which backup servers are assigned to this location group 
  2. Which of them are available to the user
  3. Which of those have enough space and bucket limits. Free disk size on a target must be at least equal to all VS disk size.
  4. From those remaining, the most appropriate backup server will be the one with the smallest count of "take backup" transactions at the moment of the check
  5. If for several backup  servers this quantity is equal (0, 1, 2, ...n), the backup server with the lowest load (highest cpu_idle parameter) will be selected as the most appropriate

All consequent backups will be performed at the same backup server as long as it is available and has enough storage space. If not - the alternative backup server will be selected following the principle described above.  


For the instructions on setting up backup servers, refer to the following docs:



Backup Limits in Buckets



Buckets allow you to set limits for backups for a user who is signed up with this plan.

If the backups are stored on compute resources or an SSH file transfer server, the Templates, ISOs & Backups Storage and Backups User VS Limits can be applied:

  • free disk space for backups
  • the total amount of disk space
  • the number of backups users can create for free
  • the maximum number of backups

If the backups are stored on backup servers, you can set the Backups and Backup Disk Size Backup Server Zones limits:

For auto-backups

  • free disk space for backups
  • total amount of backup server space

For manual backups

  • free disk space for backups
  • total amount of backup server space
  • the amount of backups users get for free
  • the total amount of backups

Please also set the Backups max limit to 0 in the User VS limits if you store the backups on backup servers.

For the instructions on setting up backup limits, refer to Configure Resource Allocation And Prices.



View Virtual Server Backups



To view the list of virtual server's backups:

  1. Go to your Control Panel's Virtual Servers menu.
  2. Click the label of the required virtual server.
  3. Click the Backups tab, then select the appropriate backup type:

    • Images - full backups
    • Files - incremental backups

  4. On the screen that appears, you'll see a list of virtual server backups sorted by category.
  5. Click the label of the required virtual server backup to see the following tools - restore backup, delete backup, convert it to template and add/edit note.


Take Virtual Server Backup



To take an incremental backup:

  1. Go to your Control Panel's Virtual Servers menu.
  2. Click the label of the server you want to back up.
  3. Click the Backups tab, then select Files. You'll see a list of the disks allocated to that virtual server.
  4. Click the Actions icon next to a disk you want to take a backup of, then click Backup. You'll see a list of all the backups taken and pending for that virtual server sorted by category.
  5. To take a backup, click the Take a Backup button at the end of the list.

Backups in the OnApp Control Panel are associated with a particular user instead of being associated with a virtual server. To view the list of user backups, refer to View User Backups section.

Template extraction is performed during server provisioning or taking a backup when using a particular template. To prevent the template from being used in other transactions during extraction, the template is locked during the extraction and unlocked on accomplishment. If other transaction tries to use the locked template, it will fail after 5 minutes of standby. The transaction, which locked template and failed, means that extracted template is broken.

Storing scheme:

  • template /onapp/templates/your_template.tgz
  • extracted template /onapp/backups/templates/your_template
  • locked template /onapp/backups/templates/your_template.lock



Take Virtual Server Disk Backup



To back up a virtual server:

  1. Go to your Control Panel's Virtual Servers menu.
  2. Click the label of the server you want to back up.
  3. Click the Storage tab -> Disks. You'll see a list of the disks allocated to that virtual server.
  4. Click the Actions icon next to a disk you want to take a backup of, then click Backup. You'll see a list of all the backups taken and pending for that disk, along with the tools to restore backups, delete them, and convert them to templates.
    • To make a backup, click the Take a Backup button at the end of the list. You may add a note and also Force Windows Backup

      This option for Windows virtual servers is designed as a last resort,when the backup cannot be taken due to NTFS file system problems.
      Switching this option will bring up a dialog box with the following message: "If you enable this option there is no guarantee that backup will be consistent."

      Select "Yes" to proceed

    • To restore a backup, click the Restore link next to the backup you want to revert to.
    • To convert a backup into the custom template, click Convert to Template link next to the backup (see Create custom templates).
  • For Windows VSs: make sure that disk filesystem (NTFS) is consistent (not corrupted) before backup conversion to a custom template. It is highly recommended to take a backup after VS shutdown. Otherwise, proper template provisioning is not guaranteed.
  • Backups in the OnApp Control Panel are associated with a particular user instead of being associated with a virtual server. To view the list of user backups, refer to View User Backups section.



Convert Virtual Server Backup to Template



To convert virtual server backup to template:

  1. Go to your Control Panel's Virtual Servers menu.
  2. Click the label of the required virtual server.
  3. Click the Backups tab, then select the appropriate backup type:

    • Images - full backups
    • Files - incremental backups

  4. On the screen that appears, click the Actions icon next to the backup and choose the Convert to Template (see Create custom templates).

For Windows VSs: make sure that disk filesystem (NTFS) is consistent (not corrupted) before backup conversion tocustomtemplate. It is highly recommended to takebackupafter VS shutdown.Otherwiseproper template provisioning is not guaranteed.



Restore Virtual Server Backup



To restore a backup:

  1. Go to your Control Panel's Virtual Servers menu.
  2. Click the label of the required virtual server.
  3. Click the Backups tab, then select the appropriate backup type:

    • Images - full backups
    • Files - incremental backups

  4. On the screen that appears, click the Actions icon next to the backup you want to revert to and choose Restore.

    If the file system on the disk is corrupted, it won't be possible to restore the files from incremental backup. In that case, you can force a backup restore and rebuild a file system on a disk. To do this, move the Force Restore slider to the right.

  5. Click the Restore Backup button.


Add Virtual Server Backup Note



To edit virtual server backup's note:

  1. Go to your Control Panel's Virtual Servers menu.
  2. Click the label of the required virtual server.
  3. Click the Backups tab, then select the appropriate backup type:

    • Images - full backups
    • Files - incremental backups

  4. On the screen that appears, click the Actions icon next to the required backup and choose Add Note. Make necessary changes and click Submit.


Delete Virtual Server Backup



To delete a backup:

  1. Go to your Control Panel's Virtual Servers menu.
  2. Click the label of the required virtual server.
  3. Click the Backups tab, then select the appropriate backup type:

    • Images - full backups
    • Files - incremental backups

  4. On the screen that appears, click the Actions icon next to the backup you want to remove and choose Delete.