This repository has been archived on 2024-07-12. You can view files and clone it, but cannot push or open issues or pull requests.
vn-vmware/config.pl

82 lines
1.9 KiB
Perl
Raw Normal View History

2018-08-13 18:50:48 +00:00
# Configuration file, be careful to respect the Perl syntax.
# Don't modify this file, copy it to config.my.pl and make your changes there.
# The log file path
2018-08-14 14:23:33 +00:00
log_file => '/var/log/vn-vmware.log',
2018-08-13 18:50:48 +00:00
# The datacenter name
datacenter => 'datacenter1',
# The datastore name where backups must be stored
backup_datastore => 'backups',
# The local directory where backups datastore folder is mounted
# If it's mounted via NFS you have to disable caching for the mount
2018-08-13 18:50:48 +00:00
local_backup_dir => '/mnt/vm-backups',
# Number of processes used by pigz to compress backups
pigz_processes => 1,
# The default rotation to use if none is specified on job
rotation => 'lastMonth',
2018-08-13 18:50:48 +00:00
# Backup rotation configuration
rotations => {
2018-08-15 19:35:13 +00:00
lastMonth => {
2018-08-13 18:50:48 +00:00
days => 31,
2020-05-22 13:04:20 +00:00
count => 31,
archive_regex => '^\d{4}-\d{2}-01'
# Function used to archive and exclude backups from rotation
# https://perldoc.perl.org/Time/Piece.html
# https://perldoc.perl.org/Time/Seconds.html
archive_fn => sub {
my ($backup_time, $now) = @_;
return $backup_time->year < $now->year - 1;
}
},
lastWeek => {
days => 7
},
lastYear => {
days => 365
}
},
# Backup jobs
backup_jobs => {
fooJob => {
machines => ['foo'],
rotation => 'lastYear'
},
barJob => {
machines => [{
name => 'bar',
disks => 'bar.vmdk'
}]
},
bazJob => {
machines => [{
name => 'baz',
rotation => 'lastWeek'
}]
2018-08-13 18:50:48 +00:00
}
},
2018-08-15 15:00:07 +00:00
# Clone jobs
clone_jobs => {
2018-08-13 18:50:48 +00:00
machine => {
2018-08-15 15:00:07 +00:00
vm => 'test',
dst_name => 'test-clone',
2018-08-13 18:50:48 +00:00
dst_host => '127.0.0.1',
dst_datastore => 'datastore1',
memory => 4084,
num_cpus => 2,
2018-08-15 15:00:07 +00:00
mac => '00:50:56:BF:01:01',
2018-08-13 18:50:48 +00:00
poweron => 1,
2018-08-15 20:29:56 +00:00
# Be very careful with this option! It deletes destination machine if it exists.
2018-08-13 18:50:48 +00:00
overwrite => 1
}
}