git-svn-id: http://code.autistici.org/svn/backupninja/trunk@173
758a04ac-41e6-0310-8a23-
8373a73cc35d
then nano, vim and vi, and aborts if none of these exists.
added helper for pgsql handler.
rdiff handler now does not require 'label'
then nano, vim and vi, and aborts if none of these exists.
added helper for pgsql handler.
rdiff handler now does not require 'label'
+ changes to mysql and svn handlers' vservers support
+ these handlers now check if the source vserver is running
version 0.7 -- July 26 2005
added ninjahelper: a dialog based wizard for creating backupninja configs.
version 0.7 -- July 26 2005
added ninjahelper: a dialog based wizard for creating backupninja configs.
-# Check to make sure that the specified vserver exists
+# If needed, make sure that the specified vserver exists and is running.
+ info "examining vserver '$vsname'"
+ # does it exist ?
vroot="$VROOTDIR/$vsname"
[ -d $vroot ] || fatal "vserver '$vsname' does not exist at '$vroot'"
vroot="$VROOTDIR/$vsname"
[ -d $vroot ] || fatal "vserver '$vsname' does not exist at '$vroot'"
+ # is it running ?
+ running=`$VSERVERINFO $vsname RUNNING`
+ [ $running = 1 ] || fatal "vserver $vsname is not running."
fi
# create backup dirs, the vroot variable will be empty if no vsname was specified
fi
# create backup dirs, the vroot variable will be empty if no vsname was specified
#
# PostgreSQL handler script for backupninja
#
#
# PostgreSQL handler script for backupninja
#
-# Check to make sure that the specified vserver exists
+# If needed, make sure that the specified vserver exists and is running.
+ info "examining vserver '$vsname'"
+ # does it exist ?
vroot="$VROOTDIR/$vsname"
[ -d $vroot ] || fatal "vserver '$vsname' does not exist at '$vroot'"
vroot="$VROOTDIR/$vsname"
[ -d $vroot ] || fatal "vserver '$vsname' does not exist at '$vroot'"
+ # is it running ?
+ running=`$VSERVERINFO $vsname RUNNING`
+ [ $running = 1 ] || fatal "vserver $vsname is not running."