--- ######################## #### Global options #### ######################## ## Be more verbose ## debug: False ## How many threads (simultaneos backups) to run. Use 0 to use all CPU threads ## detected, 1 to disable multitheading for backups, or the number of threads ## wanted. Default: 1 threads: 0 ############################ #### Libvirt connection #### ############################ ## Libvirt URI ## uri: "qemu+ssh://127.0.0.1:222/system" ## Libvirt authentication, if needed ## username: passphrase: ####################### #### Backup groups #### ####################### ## Groups are here to share the same backup options between multiple domains. ## That way, it is possible, for example, to have a different policy retention ## for a pool of guests in testing than for the one in production. ## Define default options for all groups. ## default: hourly: 0 daily: 2 weekly: 2 monthly: 1 yearly: 0 ## Groups definition ## groups: ## Group name ## mother: ## Backup directory ## target: /var/backups/vm/mother ## Packager to use for each backup: ## directory: images will be copied as they are, in a directory per domain ## tar: images will be packaged in a tar file ## zstd: images will be compressed with zstd. Requires python "zstandard" package to be installed. packager: directory ## Options for the choosen packager: #tar: ## # Compression algorithm to use. Default to None. # compression: "xz" #None | "xz" | "gz" | "bz2" ## # Compression level to use for each backup. ## # Generally this should be an integer between 1~9 (depends on the ## # compression algorithm), where 1 will be the fastest while having ## # the lowest compression ratio, and 9 gives the best compression ratio ## # but takes the longest time to compress. # compression_lvl: 5 ## ## zstd: ## # Compression level to use for each backup. ## # 1 will be the fastest while having the lowest compression ratio, ## # and 22 gives the best compression ratio but takes the longest time ## # to compress. ## compression_lvl: [1-22] #packager_opts: # compression: xz # compression_lvl: 6 ## When doing `virt-backup backup` without specifying any group, only ## groups with the autostart option enabled will be backup. autostart: True ## Retention policy: the first backup of the day is considered as the ## "daily" backup, first of the week "weekly", etc. The following options ## detail how many backups of each type has to be kept. Set to "*" or None for an ## infinite retention. ## Default to 5 for everything, meaning that calling "virt-backup clean" will let 5 ## backups for each period not specified in the config. hourly: 0 daily: 2 weekly: 2 monthly: 1 yearly: 0 ## Enable the Libvirt Quiesce option when taking the external snapshots. ## ## From Libvirt documentation: libvirt will try to freeze and unfreeze the guest ## virtual machine’s mounted file system(s), using the guest agent. However, if the ## guest virtual machine does not have a guest agent, snapshot creation will fail. ## ## However, virt-backup has a fallback mechanism if the snapshot happens to fail ## with Quiesce enabled, and retries without it. quiesce: False ## Hosts definition ## hosts: ## This policy will match the domain "domainname" in libvirt, and will ## backup the disks "vba" and "vdb" only. #- host: domainname # disks: # - vda # - vdb ## Quiesce option can also be overriden per host definition. # quiesce: False ## Will backup all disks of "domainname2" ## #- domainname2 ## Regex that will match for all domains starting with "prod". The regex ## syntax is the same as the python one - host: "r:.*" # disks: # - vda ## Exclude the domain domainname3 (useful with regex, for example) #- "!domainname3" ## Exclude all domains starting with "test" - "!r:^generic.*" # vim: set ts=2 sw=2: