Koozali.org: home of the SME Server

Dar Backup

Offline ronaldson40

  • ***
  • 96
  • +0/-0
Dar Backup
« on: July 03, 2007, 07:20:27 AM »
I am running a virutal machine using VMWARe.

I have scheduled a dar backup of certain folders everyday at 2:00 am in the morning.

Now VMware stores its virtual machines in the folder  /opt/vmmachines
I have added this to the folders included for backup.

However i need to stop the vm machine when the backup starts and restart it when the backup finishes.

Regards
Ronald

DAR OUTPUT
Code: [Select]
Connecting to /mnt/bigdisk
Expanding /etc/dar2/serverbackup template
Creating destination /datahub.sns.local/serverbackup dir
Creating /mnt/bigdisk/datahub.sns.local/serverbackup/db.zip
Expiring old backups
Executing pre-backup event
Verbose logging is off
Performing serverbackup backup
No terminal found for user interaction. All questions will be assumed a negative answer (less destructive choice), which most of the time will abort the program.

WARNING! File modified while reading it for backup: /opt/vmmachines/Windows XP Professional/Windows XP Professional.vmdk


 --------------------------------------------
 14613 inode(s) saved
 with 20 hard link(s) recorded
 1 inode(s) changed at the moment of the backup
 0 inode(s) not saved (no inode/file change)
 0 inode(s) failed to save (filesystem error)
 257 inode(s) ignored (excluded by filters)
 0 inode(s) recorded as deleted from reference backup
 --------------------------------------------
 Total number of inode considered: 14871
 --------------------------------------------

Offline ronaldson40

  • ***
  • 96
  • +0/-0
Dar Backup
« Reply #1 on: July 04, 2007, 04:40:06 PM »
Any ideas..? Can I insert a script before the dar script runs?? Can this be within the dar script... i.e add a stop to vmware services and once backup done start vmware services... I think it should be possible...


I need to backup the vmx since it is hosting my company accounting data... if anythin happens to it... it will hurt us bad....

Offline byte

  • *
  • 2,183
  • +2/-0
Dar Backup
« Reply #2 on: July 04, 2007, 07:37:10 PM »
Moving this topic to the SME 7.x contribs forum, it is more appropriate there. Thanks!
--[byte]--

Have you filled in a Bug Report over @ http://bugs.contribs.org ? Please don't wait to be told this way you help us to help you/others - Thanks!

Offline dmay

  • *
  • 450
  • +0/-0
    • http://myezserver.com
Dar Backup
« Reply #3 on: July 04, 2007, 08:34:34 PM »
Quote from: "ronaldson40"
Any ideas..? Can I insert a script before the dar script runs??.

This feature is already provided for you via the SME default pre-backup and post-backup events. Simply add action scripts for whatever you need to occur into these two default events. Read the developer manual for guidelines on actions/events.

Darrell

Offline ronaldson40

  • ***
  • 96
  • +0/-0
Dar Backup
« Reply #4 on: July 04, 2007, 09:06:04 PM »
So is this what I do

1. Create S60stopvmware having the following contents in the directory /etc/e-smith/events/pre-backup

Code: [Select]
#!/bin/sh
/etc/rc.d/init.d/vmware stop


2. Create S60startvmware having the following contents in the directory /etc/e-smith/events/post-backup

Code: [Select]
#!/bin/sh
/etc/rc.d/init.d/vmware start


3. Run
Code: [Select]
signal-event post-upgrade

Am I correct?

Offline dmay

  • *
  • 450
  • +0/-0
    • http://myezserver.com
Dar Backup
« Reply #5 on: July 05, 2007, 11:12:42 PM »
Quote from: "ronaldson40"
3. Run
Code: [Select]
signal-event post-upgrade
Am I correct?

There is no need to run the above _unless_ you are performing an upgrade. If you are just performing a backup, simply perform the backup. Nothing further required. The backup scripts executes the pre/post backup events.

Darrell

Offline ronaldson40

  • ***
  • 96
  • +0/-0
Dar Backup
« Reply #6 on: July 06, 2007, 04:05:13 PM »
Thank you....it worked....