I go to backup manager and get time frame- when I can copy 100 Gigs via network, he says at 4 o'clock morning and he mades NFS accessible from VMware server. Here is printscreen, you figure it out.
Create folders on backup server for Monday, Tuesday etc
Generate key pair.
ssh-keygen -t rsa -f server3 -N ''
Notice empty quotes at the end, otherwise key will be generated with password
Write some script to create backup which does:
- Shutdown virtual machine
- Copy all but disks
- Clone disks
- Power on virtual machine
Test that script. Here is my script
ssh -i server3 root@10.21.1.1 vim-cmd vmsvc/power.shutdown 23
# erase old backup
ssh -i server3 root@10.21.1.1 rm -f /vmfs/volumes/Backup/vm2/*
ssh -i server3 root@10.21.1.1 cp /vmfs/volumes/datastore2/server3/server3.vmx /vmfs/volumes/Backup/vm2/
# wait until vm turns off
sleep 300
ssh -i server3 root@10.21.1.1 vmkfstools -i /vmfs/volumes/datastore2/server3/server3_1.vmdk -d thin /vmfs/volumes/Backup/vm2/server3_1.vmdk
ssh -i server3 root@10.21.1.1 vim-cmd vmsvc/power.on 23
Where server3 are servername to backup.
Copy backups to backup server
Create crontab task. crontab -e works fine. Here is output of my crontab -l command
On Tuesday night 3:30 AM will be created Monday backup etc.
Script can be placed on backup server or on administrator machine, I think better to place on backup server and keep copy on administrator machine or you just have one more point of failure. Then you have to check mails on your backup server, crontab sends results to mail@localhost, can be seen typing mail and then number of mail.
Nav komentāru:
Ierakstīt komentāru