2018-08-13 18:50:48 +00:00
|
|
|
# Configuration file, be careful to respect the Perl syntax.
|
2020-05-30 17:51:25 +00:00
|
|
|
# Don't modify this file, copy it to config.local.pl and make your changes there.
|
2018-08-13 18:50:48 +00:00
|
|
|
|
|
|
|
# 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
|
2020-05-22 17:00:26 +00:00
|
|
|
backup_datastore => 'backup',
|
2018-08-13 18:50:48 +00:00
|
|
|
|
2020-05-30 17:51:25 +00:00
|
|
|
# Directory where backups are stored
|
2018-08-22 12:40:26 +00:00
|
|
|
# If it's mounted via NFS you have to disable caching for the mount
|
2021-11-02 13:26:34 +00:00
|
|
|
backup_dir => '/mnt/backup',
|
|
|
|
|
|
|
|
# The default storage class
|
|
|
|
storage_class => 'nearline',
|
|
|
|
|
|
|
|
# The archive storage class
|
|
|
|
archive_class => 'archive',
|
2020-05-22 17:00:26 +00:00
|
|
|
|
2020-05-30 17:51:25 +00:00
|
|
|
# Directory where backups are be restored
|
2020-05-22 17:00:26 +00:00
|
|
|
restore_dir => '/mnt/backup',
|
2018-08-13 18:50:48 +00:00
|
|
|
|
2020-05-30 17:51:25 +00:00
|
|
|
# Directory where local backup directory is replicated
|
|
|
|
replicate_dir => '/mnt/backup-sync',
|
|
|
|
|
2018-09-17 10:17:19 +00:00
|
|
|
# Number of processes used by pigz to compress backups
|
|
|
|
pigz_processes => 1,
|
|
|
|
|
2020-05-22 17:00:26 +00:00
|
|
|
# Whether to encrypt backups using gpg with passed passphrase file
|
2020-05-30 17:51:25 +00:00
|
|
|
passphrase_file => '/etc/vn-vmware/gpg.key',
|
2020-05-22 17:00:26 +00:00
|
|
|
|
2020-02-17 12:31:17 +00:00
|
|
|
# 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,
|
2021-11-02 13:26:34 +00:00
|
|
|
archive_regex => '^\d{4}-\d{2}-01',
|
2020-05-22 13:04:20 +00:00
|
|
|
|
|
|
|
# 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;
|
|
|
|
}
|
2020-02-17 12:31:17 +00:00
|
|
|
},
|
|
|
|
lastWeek => {
|
2021-11-02 13:26:34 +00:00
|
|
|
days => 7,
|
|
|
|
storage_class => 'archive'
|
2020-02-17 12:31:17 +00:00
|
|
|
},
|
|
|
|
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
|
|
|
|
}
|
|
|
|
}
|