2015-11-10 15:00:12 +01:00
# Backups
2019-02-05 17:17:38 +01:00
> Watch our [introduction video](https://www.youtube.com/watch?v=FfUqIwT8KzI) (45m) to Backup in Xen Orchestra!
2018-05-17 16:38:00 -04:00
This section is dedicated to all existing methods of rolling back or backing up your VMs in Xen Orchestra.
2015-11-10 15:00:43 +01:00
2018-05-17 16:38:00 -04:00
There are several ways to protect your VMs:
2015-11-17 16:57:05 +01:00
2018-05-17 16:38:00 -04:00
* [Full Backups ](full_backups.md ) [*Starter Edition*]
* [Rolling Snapshots ](rolling_snapshots.md ) [*Starter Edition*]
* [Delta Backups ](delta_backups.md ) (best of both previous ones) [*Enterprise Edition*]
* [Disaster Recovery ](disaster_recovery.md ) [*Enterprise Edition*]
2019-03-01 09:49:25 +01:00
* [Metadata Backups ](metadata_backup.md ) [*Enterprise Edition*]
2018-05-17 16:38:00 -04:00
* [Continuous Replication ](continuous_replication.md ) [*Premium Edition*]
* [File Level Restore ](file_level_restore.md ) [*Premium Edition*]
2016-09-13 11:29:57 +02:00
2018-03-20 16:46:32 -04:00
> Don't forget to take a look at the [backup troubleshooting](backup_troubleshooting.md) section. You can also take a look at the [backup reports](backup_reports.md) section for configuring notifications.
2017-05-23 16:26:18 +02:00
2018-03-20 16:46:32 -04:00
There is also a way to automatically select the VMs to backup: ** [smart backup ](smart_backup.md )** [*Enterprise Edition*]
2015-11-17 16:57:05 +01:00
2015-11-13 11:27:00 +01:00
## Overview
2018-05-17 16:38:00 -04:00
This is the welcome panel for the backup view. It recaps all existing scheduled jobs. This is also where the backup logs are displayed.
2015-11-13 11:27:00 +01:00
2015-11-10 16:09:39 +01:00
## Logs
All the scheduled operations (backup, snapshots and even DR) are displayed in the main backup view.
2018-05-17 16:38:00 -04:00
A successful backup task will be displayed in green, a faulty one in red. You can click on the arrow to see each entry detail.
2015-11-10 16:09:39 +01:00
2015-11-27 12:53:00 +01:00
You also have a filter to search anything related to these logs.
2018-05-17 16:38:00 -04:00
> Logs are not "live" tasks. If you restart XOA during a backup, the log associated with the job will stay in orange (in progress), because it wasn't finished. It will stay forever unfinished because the job was cut in the middle.
2017-01-03 10:59:40 +01:00
2018-09-17 17:23:45 +02:00
## Backups execution
Each backups' job execution is identified by a `runId` . You can find this `runId` in its detailed log.

2017-01-03 10:59:40 +01:00
## Consistent backup (with quiesce snapshots)
2018-08-28 14:35:46 -04:00
All backup types rely on snapshots. But what about data consistency? By default, Xen Orchestra will try to take a **quiesced snapshot** every time a snapshot is done (and fall back to normal snapshots if it's not possible).
2017-01-03 10:59:40 +01:00
2019-02-24 07:27:16 -05:00
Snapshots of Windows VMs can be quiesced (especially MS SQL or Exchange services) after you have installed Xen Tools in your VMs. However, [there is an extra step to install the VSS provider on windows ](https://xen-orchestra.com/blog/xenserver-quiesce-snapshots/ ). A quiesced snapshot means the operating system will be notified and the cache will be flushed to disks. This way, your backups will always be consistent.
2017-01-03 10:59:40 +01:00
2018-08-28 14:35:46 -04:00
To see if you have quiesced snapshots for a VM, just go into its snapshot tab, then the "info" icon means it is a quiesced snapshot:
2017-01-03 10:59:40 +01:00

The tooltip confirms this:

2016-09-13 11:29:57 +02:00
## Remotes
2016-12-19 14:36:35 +01:00
> Remotes are places where your *backup* and *delta backup* files will be stored.
2018-05-17 16:38:00 -04:00
To add a *remote* , go to the **Settings/Remotes** menu.
2016-09-13 11:29:57 +02:00
2018-05-17 16:38:00 -04:00
Supported remote types:
2016-09-13 11:29:57 +02:00
2018-05-17 16:38:00 -04:00
* Local (any folder in XOA filesystem)
2016-09-13 11:29:57 +02:00
* NFS
* SMB (CIFS)
2016-12-19 14:36:35 +01:00
> **WARNING**: the initial "/" or "\\" is automatically added.
2016-09-13 11:29:57 +02:00
### NFS
2018-03-20 16:46:32 -04:00
On your NFS server, authorize XOA's IP address and permissions for subfolders. That's all!
2016-09-13 11:29:57 +02:00
### SMB
We support SMB storage on *Windows Server 2012 R2* .
2018-05-17 16:38:00 -04:00
> WARNING: For continuous delta backup, SMB is **NOT** recommended (or only for small VMs, eg < 50GB)
2017-01-03 10:59:40 +01:00
2018-05-17 16:38:00 -04:00
Also, read the UI twice when you add an SMB store. If you have:
2016-09-13 11:29:57 +02:00
* `192.168.1.99` as SMB host
* `Backups` as folder
* no subfolder
You'll have to fill it like this:

**PATH TO BACKUP is only needed if you have subfolders in your share.**
### Local
2018-05-17 16:38:00 -04:00
> **This is for advanced users**. Using the local XOA filesystem without extra mounts/disks will **use the default system disk of XOA**.
2016-09-13 11:29:57 +02:00
2018-05-17 16:38:00 -04:00
If you need to mount an unsupported store (FTP for example), you can always do it manually:
2016-09-13 11:29:57 +02:00
2018-05-17 16:38:00 -04:00
1. mount your remote store inside the XOA filesystem manually, e.g in `/media/myStore`
2016-09-13 11:29:57 +02:00
2. in the web interface, select a "local" store and point it to your `/media/myStore` folder.
Any Debian Linux mount point could be supported this way, until we add further options directly in the web interface.
## Restore backups
2018-03-20 16:46:32 -04:00
All your scheduled backups are acccessible in the "Restore" view in the backup section of Xen Orchestra.
2015-11-27 12:53:00 +01:00
2018-03-20 16:46:32 -04:00
1. Select your remote and click on the eye icon to see the VMs available
2016-09-13 11:29:57 +02:00
2. Choose the backup you want to restore
2018-03-20 16:46:32 -04:00
3. Select the SR where you want to restore it
2015-11-27 12:53:00 +01:00
2018-05-17 16:38:00 -04:00
> Note: You can restore your backup even on a brand new XenServer and on brand new hardware.
2017-09-15 14:34:13 +02:00
2016-09-13 11:29:57 +02:00
## About backup compression
2015-11-27 12:53:00 +01:00
2018-05-17 16:38:00 -04:00
By default, *Backups* are compressed (using GZIP, done on XenServer side). There is no absolute rule but in general uncompressed backups are faster (but sometimes much larger).
2015-11-27 12:53:00 +01:00
2016-09-13 11:29:57 +02:00
XenServer uses Gzip compression, which is:
2015-11-27 12:53:00 +01:00
2018-05-17 16:38:00 -04:00
* slow (single threaded)
2016-09-13 11:29:57 +02:00
* space efficient
2018-05-17 16:38:00 -04:00
* consumes less bandwidth (helpful if your NFS share is far away)
2015-11-27 12:53:00 +01:00
2018-05-17 16:38:00 -04:00
If you have compression on your NFS share (or destination filesystem like ZFS), you can disable compression in Xen Orchestra.
2016-09-13 11:29:57 +02:00
## Add a disk for local backups
2018-05-17 16:38:00 -04:00
If you want to use XOA to locally store all your backups, you need to attach a large disk to it. This can be done live.
2016-09-13 11:29:57 +02:00
First, after your disk is attached to XOA, you'll have to find the new disk name with `fdisk -l` . It's probably `xvdb` .
Then, create a filesystem on it:
```
mkfs.ext4 /dev/xvdb
```
2018-03-20 16:46:32 -04:00
If you already have backups done, you can move them to the new disk. The orignal backups folder is in `/var/lib/xoa-backups` .
2016-09-13 11:29:57 +02:00
2018-03-20 16:46:32 -04:00
To make the mount point persistent in XOA, edit the `/etc/fstab` file, and add:
2016-09-13 11:29:57 +02:00
```
/dev/xvdb /var/lib/xoa-backups ext4 defaults 0 0
```
2018-05-17 16:38:00 -04:00
This way, without modifying your previous scheduled snapshot, they will be written to this new local mountpoint!
2018-12-12 16:04:03 +01:00
## High availability (HA) disabled on replicated VMs
Replicated VMs HA are taken into account by XS/XCP-ng. To avoid the resultant troubles, HA will be disabled from the replicated VMs and a tag indicating this change will be added.


> The tag won't be automatically removed by XO on the replicated VMs, even if HA is re-enabled.