Introduction to Cloudmin Backups
Cloudmin allows the master administrator and system owners to create backups of virtual systems running under Xen, OpenVZ, Vservers or Solaris Zones. This provides protection against accidental deletion of files within the filesystem, for example by an accidental rm * command.
Backups can be either run manually or on a regular schedule, such as once per day. When a backup is taken the virtual system can be either shut down to ensure a consistent filesystem state, or left running to avoid downtime.
What is and is not Backed Up
Currently, backups only include the contents of the virtual system's filesystem or disk images. For Xen systems the backup contains a compressed copy of all virtual disks, while for other virtualization types it is just a TAR file of the filesystem.
When backing up a running Xen system using LVM logical volumes to store disk images, LVM snapshots are used to take an instantaneous copy of the filesystem while it is copied. Each will consume 10% of the space in the volume group as the underlying disk images, so make sure you leave some LVM space free.
Other configuration files and data are not included - so if a virtual system is completely destroyed, it must be first re-created before the backup can be restored.
Backup Destinations
Cloudmin can backup virtual systems to a variety of different destinations - via SCP, FTP or to any system it manages. In a typical Cloudmin setup a single system with plenty of disk space is chosen as backup destination, perhaps the master system itself. Backups are taken on the host systems and then transferred to this backup machine. Alternately, you can choose to store backups on the hosts themselves, to avoid the need to transfer large backup files over the network.
Each host system defines a default backup destination for its virtual systems. You can set this as follows :
- Login to Cloudmin, open the Host Systems category and click on the link for your virtualization type, such as Xen Host Systems.
- Click on the first of your hosts, and open the Default backup destination section.
- Select a destination type and fill in the fields next to it - for example, in you have a dedicated backup system you could select Directory on system, choose it from the menu, and enter a path like
/backup. - Click the Save button, then repeat the same steps for other host systems.
When a backup is made it will be saved to the specified directory in a file whose name is that of the virtual system with .tar.gz appended. Each subsequent backup of the same system to the same destination will overwrite that file.
Creating a Scheduled Backup
Once a default destination has been set, you can schedule a backup like so :
- Open the Backup and Restore category on the left menu and click on System Backups.
- Click the Add a new system backup link.
- From the Systems to backup list select the virtual systems you want to include.
- To have them shut down during the backup process, change Shut down systems? to Yes.
- In the Backup destination, you can typically leave Default destination for host system selected unless you want the backup to be sent to an FTP or SSH server outside of Cloudmin's control.
- Change Scheduled backup enabled? to Yes, and select a schedule in the When to backup field.
- To be notified on backup failures, enter your address in the Email results to field.
- Click the Create button.
It is possible to leave Scheduled backup enabled? set to No if you just want to define a backup that will always be run manually.
After a backup has been defined, you can edit or remove it by clicking on its entry in the System Backups list.
Running a Backup Manually
To kick off a backup, just click on it in the System Backups list and then hit the Backup Now button. Progress messages will be displayed as it runs, and a final summary of systems completed and backup sizes when it finishes. Depending on the sizes of the systems being backed up, it may take minutes or hours.
Testing a scheduled backup after creating it is strongly recommended. Also, you should create, backup and restore a test system that uses the same configuration and destination as your production systems to ensure that all steps in the process are working properly.
Backup Logs and Restoring Backups
Cloudmin logs all backups it performs, including their final status, systems included, disk used and possibly the complete progress report. To view logs, go to Backup and Restore -> Backup Logs, and enter a hostname or destination path into the Find backup logs box, then click Search.
The simplest way to restore a backup is to click on its destination in the search results, which will open a restore form. You can also restore some or all systems from a scheduled backup as follows :
- Go to Backup and Restore -> System Backups, and click on a backup.
- Click the Restore button.
- Select the systems to restore - typically you only want one, instead of everything that was included.
- Click Restore Now.
