Friday, March 13, 2015

ghettovcb status

sadly, my esx servers do not email me. that's just life.
but, one thing i really want to know is if they're doing their backups every day. well, i have them connected to an nfs server. and i can run find on the backup directory. you can, too. i like find, by the way. i really do.

find /opt/vm-repo/vm_backups -type d -mtime 0 | sort | mail -s "vm_backup dir change" me@there.com
     ^                       ^       ^          ^      ^
     |                       |       |          |      |
     dir to find in          dir     |          alpha  mail to me
                                     |
                                     modify time 24hrs
crontab it and away you go.

here's what i get:
/opt/vm-repo/vm_backups
/opt/vm-repo/vm_backups/sillyvm
/opt/vm-repo/vm_backups/sillyvm/sillyvm-2015-03-12_23-00-01
/opt/vm-repo/vm_backups/sillyvm/sillyvm-2015-03-13_05-00-01
/opt/vm-repo/vm_backups/sillyvm/sillyvm-2015-03-13_11-00-01
Post a Comment