Configuration automatic backup

To back up your server there is a script included in the linuxmuster-hv-tools which creates snapshots and shifts them to a storage of your choice. Keep in mind that the backups are not stored incrementally and thereby take a lot of storage space. Therefore usually only a few full backups can be stored . In the main.cfg file you can use the parameter Maxage to specify how many backups are retained on disk. These backups are used primarily in the case of disaster. For version secure backups over a longer period of time, we recommend special software.

You can use any storage you want (NAS, USB disk, internal disk, …). You can enter the location for the backup in the file /usr/share/linuxmuster-hv-tools/etc/main.cfg. If nothing is entered, it will search for an SR, which is labeled “BackupStore”. This is then used as a target. In our example, we connect to an NFS share on a NAS device with the IP

Configuration XenCenter

Open XenCenter and click with the right mouse button on xen, select New SR.

Konfiguration Schritt 55

Select one of the items under ISO library.

Konfiguration Schritt 56

Name your Storage. If you use the name “BackupStore” you do not need to adjust the main.cfg later. This name is automatically detected as a target.

Konfiguration Schritt 57

Enter the path to the share that that you want to use and click on Finish.

Konfiguration Schritt 58

You have successfully set up the storage if it is displayed on the left in the overview.

Konfiguration Schritt 59

To set which VMs should be backed up, it is sufficient to set a specific tag in the VMs that should be backed up. Click with the right mouse button on the desired VM and select Properties.

Konfiguration Schritt 60

In the General section click on Edit tags....

Konfiguration Schritt 61

Enter ni-backup as tag. Click on Create and then on OK. Because of this tag the machine is included in the backup. For all other machines the tag is already listed and only needs to be activated with the checkbox.

Konfiguration Schritt 62
Konfiguration Schritt 63

Configuration XenServer

To start a backup, go to the console of the XenServer and enter the following command:

$ /usr/share/linuxmuster-hv-tools/tools/

and confirm with Enter.

Konfiguration Schritt 64

You will now see a snapshot on your share, that you can restore in case of emergency.

Konfiguration Schritt 65

Automatic backups

To automatically perform backups at certain times, you can create a cron job. To do this, enter the command in the XenServer console

$ nano /etc/crontab

and confirm with Enter.

Konfiguration Schritt 66

For a weekly backup that starts every Friday at 20:00, enter the following line in the file:

0 20 \* \* 5 /usr/share/linuxmuster-hv-tools/tools/
Konfiguration Schritt 67

Exit the editor and save the file. The time for the backup follows this time specification which is read as a filter:

Only at minute 0 [0-60] Only at hour 20 [0-20] Only at day * (every day of the month) [1-31] Only at month * (every month of the year) [1-12] Only at weekday 5 [0-7] 0,7 = Sunday
0 20 * * 5