]> git.proxmox.com Git - pve-docs.git/blobdiff - vzdump.adoc
backup: rework storage section, mentioning and recommending PBS
[pve-docs.git] / vzdump.adoc
index a2b908dd18d6dc9cb4ec8c841db7cf932cc134ac..0c5b32ef3c16390f0b8386b5f6eb5757f116c3bd 100644 (file)
@@ -37,21 +37,32 @@ the `vzdump` command line tool.
 
 .Backup Storage
 
-Before a backup can run, a backup storage must be defined. Refer to
-the Storage documentation on how to add a storage. A backup storage
-must be a file level storage, as backups are stored as regular files.
-In most situations, using a NFS server is a good way to store backups.
-You can save those backups later to a tape drive, for off-site
-archiving.
+Before a backup can run, a backup storage must be defined. Refer to the
+xref:chapter_storage[storage documentation] on how to add a storage. It can
+either be a Proxmox Backup Server storage, where backups are stored as
+de-duplicated chunks and metadata, or a file-level storage, where backups are
+stored as regular files. Using Proxmox Backup Server on a dedicated host is
+recommended, because of its advanced features. Using an NFS server is a good
+alternative. In both cases, you might want to save those backups later to a tape
+drive, for off-site archiving.
 
 .Scheduled Backup
 
 Backup jobs can be scheduled so that they are executed automatically
 on specific days and times, for selectable nodes and guest systems.
 Configuration of scheduled backups is done at the Datacenter level in
-the GUI, which will generate a cron entry in /etc/cron.d/vzdump.
-
-Backup modes
+the GUI, which will generate a job entry in /etc/pve/jobs.cfg, which
+will in turn be parsed and executed by the `pvescheduler` daemon.
+These jobs use the xref:chapter_calendar_events[calendar events] for
+defining the schedule.
+
+Since scheduled backups miss their execution when the host was offline or the
+pvescheduler was disabled during the scheduled time, it is possible to configure
+the behaviour for catching up. By enabling the `Repeat missed` option
+(`repeat-missed` in the config), you can tell the scheduler that it should run
+missed jobs as soon as possible.
+
+Backup Modes
 ------------
 
 There are several ways to provide consistency (option `mode`), 
@@ -185,6 +196,14 @@ Backup Encryption
 For Proxmox Backup Server storages, you can optionally set up client-side
 encryption of backups, see xref:storage_pbs_encryption[the corresponding section.]
 
+Backup Jobs
+-----------
+
+Besides triggering a backup manually, you can also setup periodic jobs that
+backup all, or a selection of virtual guest to a storage.
+
+// TODO: extend, link to retention below, ... di & document perf max-worker settings
+
 [[vzdump_retention]]
 Backup Retention
 ----------------
@@ -281,6 +300,50 @@ We recommend that you use a higher retention period than is minimally required
 by your environment; you can always reduce it if you find it is unnecessarily
 high, but you cannot recreate backups once they have been removed.
 
+[[vzdump_protection]]
+Backup Protection
+-----------------
+
+You can mark a backup as `protected` to prevent its removal. Attempting to
+remove a protected backup via {pve}'s UI, CLI or API will fail. However, this
+is enforced by {pve} and not the file-system, that means that a manual removal
+of a backup file itself is still possible for anyone with write access to the
+underlying backup storage.
+
+NOTE: Protected backups are ignored by pruning and do not count towards the
+retention settings.
+
+For filesystem-based storages, the protection is implemented via a sentinel file
+`<backup-name>.protected`. For Proxmox Backup Server, it is handled on the
+server side (available since Proxmox Backup Server version 2.1).
+
+Use the storage option `max-protected-backups` to control how many protected
+backups per guest are allowed on the storage. Use `-1` for unlimited. The
+default is unlimited for users with `Datastore.Allocate` privilege and `5` for
+other users.
+
+[[vzdump_notes]]
+Backup Notes
+------------
+
+You can add notes to backups using the 'Edit Notes' button in the UI or via the
+storage content API.
+
+It is also possible to specify a template for generating notes dynamically for
+a backup job and for manual backup. The template string can contain variables,
+surrounded by two curly braces, which will be replaced by the corresponding
+value when the backup is executed.
+
+Currently supported are:
+
+* `{{cluster}}` the cluster name, if any
+* `{{guestname}}` the virtual guest's assigned name
+* `{{node}}` the host name of the node the backup is being created
+* `{{vmid}}` the numerical VMID of the guest
+
+When specified via API or CLI, it needs to be a single line, where newline and
+backslash need to be escaped as literal `\n` and `\\` respectively.
+
 [[vzdump_restore]]
 Restore
 -------