Backup of idle machines?

Cayuga

Renowned Member
May 3, 2011
86
0
71
I'm wondering if anyone has developed a strategy for skipping backups of VM's that haven't run since the last backup.

We have a number of machines for test and development that we need backed up, but some of them are only turned on occasionally so we spend a lot of time backing up machines where the backup is identical to the previous backup.

We could, of course, manually tweak the backup jobs, but I was hoping for something that would say "VM 160 hasn't been started since the last backup, skip it and go on to the next machine".

Any thoughts?

Thanks!

Jeff
 
Last edited:
good idea! +1 for developing the script - would the script also have to check the logs on all servers to see if it had been run?
 
I'm thinking about writing this script.

I seems to me that I need to look at which VM's are currently running and then find any VM's that were stopped since the last backup of that VM (the one caveat is that this script MUST run often enough so that interesting events don't get rotated out of existence before we look for them). It looks like the start/stop activity can be found in /var/log/syslog, /var/log/daemon.log and /var/log/pve/tasks/index. Can anyone tell me the advantages/disadvantages of using each of these log files?

I'm also thinking that it would be nice to have backups rotate across backup servers. We back up VM's to three different NFS machines and would like to always replace the oldest backup wherever it happens to live - before I reinvent the wheel, has anyone tackled this part of the problem?

Thanks!
 
Last edited: