|
Why not use some of the standard hooks in the dirvish.conf? Check the dirvish docs: http://www.dirvish.org/FAQ.html#pre_and_post_configuration_scripts JP [email protected] wrote: Send Dirvish mailing list submissions to [email protected]To subscribe or unsubscribe via the World Wide Web, visit http://www.dirvish.org/mailman/listinfo/dirvish or, via email, send a message with subject or body 'help' to [email protected] You can reach the person managing the list at [email protected] When replying, please edit your Subject line so it is more specific than "Re: Contents of Dirvish digest..." Today's Topics: 1. dirvish and an lv snapshot (Jenny Hopkins) 2. Re: dirvish and an lv snapshot (Eric Searcy) ---------------------------------------------------------------------- Message: 1 Date: Wed, 14 Jul 2010 22:40:06 +0100 From: Jenny Hopkins <[email protected]> Subject: [Dirvish] dirvish and an lv snapshot To: Dirvish user and developer mailing list <[email protected]> Message-ID: <[email protected]> Content-Type: text/plain; charset=ISO-8859-1 Hullo, I'm having problems with making a backup of an lvm partition on a xen server. I have a working script that creates an lvm snapshot of the partition and mounts it. In the dirvish cronjob script I have placed the script to run before dirvish expire and dirvish runall is called, then the same script with an unmount parameter is called. Like this: ## Example of how to mount and umount a backup partition... # mount_check /backup lvmsnapshot.sh create scafell /usr/sbin/dirvish-expire --quiet && /usr/sbin/dirvish-runall --quiet rc=$? # umount /backup || rc=$? lvmsnapshot.sh remove scafell || rc=$? exit $rc The problem is that the command to umount and remove the snapshot from the mount point is run immediately after the dirvish is called, so that there is no image to backup found. I sort of assumed that the rc=$? was to ensure the "lvmsnapshot.sh remove scafell || rc=$?" wasn't called until after dirvish had done its thing, but I must be wrong. I comment out this line and the backup runs fine. I could put that line in a separate script and call it from cron a few hours later but that's kind of messy. Can anyone offer advice? Thanks, Jenny ------------------------------ Message: 2 Date: Wed, 14 Jul 2010 16:20:03 -0700 From: Eric Searcy <[email protected]> Subject: Re: [Dirvish] dirvish and an lv snapshot To: Dirvish user and developer mailing list <[email protected]> Message-ID: <[email protected]> Content-Type: text/plain; charset=us-ascii On Jul 14, 2010, at 2:40 PM, Jenny Hopkins wrote: |
_______________________________________________ Dirvish mailing list [email protected] http://www.dirvish.org/mailman/listinfo/dirvish
