# Configuration file, be careful to respect the Perl syntax. # Don't modify this file, copy it to config.local.pl and make your changes there. # The log file path log_file => '/var/log/vn-vmware.log', # The datacenter name datacenter => 'datacenter1', # The datastore name where backups must be stored backup_datastore => 'backup', # Directory where backups are stored # If it's mounted via NFS you have to disable caching for the mount backup_dir => '/mnt/backup', # The default storage class storage_class => 'nearline', # The archive storage class archive_class => 'archive', # Directory where backups are be restored restore_dir => '/mnt/backup', # Directory where local backup directory is replicated replicate_dir => '/mnt/backup-sync', # Number of processes used by pigz to compress backups pigz_processes => 1, # Whether to encrypt backups using gpg with passed passphrase file passphrase_file => '/etc/vn-vmware/gpg.key', # The default rotation to use if none is specified on job rotation => 'lastMonth', # Backup rotation configuration rotations => { lastMonth => { days => 31, 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, storage_class => 'archive' }, 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' }] } }, # Clone jobs clone_jobs => { machine => { vm => 'test', dst_name => 'test-clone', dst_host => '127.0.0.1', dst_datastore => 'datastore1', memory => 4084, num_cpus => 2, mac => '00:50:56:BF:01:01', poweron => 1, # Be very careful with this option! It deletes destination machine if it exists. overwrite => 1 } }