Monday, May 5, 2008

Backup Procedure - Page 2 - MindTouch OpenGarden.org Forums

Backup Procedure - Page 2 - MindTouch OpenGarden.org Forums

I make a double backup,
1 with a cron job on my vm image
1 on my windows server from my complete vm image
For the last i have to suspend the Vm image for a while, but in case my complet vm image crashes i have my wiki up and runnig in a breeze

--------------------------------------

I exclude the VM dir from my automatic backup.
I run a batch file to suspend VM ware server.
This is the line tot suspend the server:
"C:\Program Files\VMware\VMware Server\vmware-cmd" "C:\Virtual Machines\Deki_Wiki_Hayes_1.8.2_VM.vmx" suspend

I gues if you have a standard install thiswil work, otherwise change the dir to correspondend to your server
After that i run 7z commandline to create a zipped copy
7z a -t7z VM.7z "C:\Virtual Machines\"*

And start the server again
"C:\Virtual Machines\Deki_Wiki_Hayes_1.8.2_VM.vmx" start

I do this with two different batch files couse after the suspend the batch file seems not to keep running.
And off course the dir where my 7z file is gets backed up normally with the rest of the system

I think i takes about 5 minutes, of course it depends on the size of your wiki.

================================================

I work also with only the batch files.
1 to suspend the server:
Quote:
"C:\Program Files\VMware\VMware Server\vmware-cmd" "C:\Virtual Machines\Deki_Wiki_Hayes_1.8.2_VM.vmx" suspend
And 1 minute later i start the second batchfile which makes the 7z zip, and start the server again.
Quote:
REM Make zip
7z a -t7z VM.7z "C:\Virtual Machines\"*
REM And start the server again
"C:\Program Files\VMware\VMware Server\vmware-cmd" "C:\Virtual Machines\Deki_Wiki_Hayes_1.8.2_VM.vmx" start
Very simple, you don't have to think about the time between backing up and starting again because the batch file works 1 command at the time.

=================================

One thing I found out is that if you suspend your VM, the backup VM won't run well on another server.
So you might try shuting down your vm fully, (make sure to configure you vmware server to "shut down guest" on Stop under power controls.)

Quote:
"C:\Program Files\VMware\VMware Server\vmware-cmd" "C:\Virtual Machines\Deki_Wiki_Hayes_1.8.2_VM.vmx" stop

that way if you server breaks down you can easily run your VM on another server or even off of vmware player on a laptop while you get your original host server fixed.

No comments: