-# As needed, make sure that :
-# * the specified vserver exists and is running
-# * the specified vserver or host has the needed executables
-if [ $usevserver ]; then
- info "examining vserver '$vsname'"
- # does it exist ?
- vroot="$VROOTDIR/$vsname"
- [ -d $vroot ] || fatal "vserver '$vsname' does not exist at '$vroot'"
- # is it running ?
- running=`$VSERVERINFO $vsname RUNNING`
- if [ $running = 1 ]; then
- if [ "$databases" == "all" ]; then
- [ -x "$vroot`$VSERVER $vsname exec which $PGSQLDUMPALL`" ] || \
- fatal "Can't find $PGSQLDUMPALL in vserver $vsname."
- else
- [ -x "$vroot`$VSERVER $vsname exec which $PGSQLDUMP`" ] || \
- fatal "Can't find $PGSQLDUMP in vserver $vsname."
- fi
- else
- fatal "vserver $vsname is not running."
- fi
+# Make sure that the system to backup has the needed executables
+if [ $usevserver = yes ]; then
+ debug "Examining vserver '$vsname'."
+ if [ "$databases" == "all" ]; then
+ [ -x "$vroot`$VSERVER $vsname exec which $PGSQLDUMPALL`" ] || \
+ fatal "Can't find $PGSQLDUMPALL in vserver $vsname."
+ else
+ [ -x "$vroot`$VSERVER $vsname exec which $PGSQLDUMP`" ] || \
+ fatal "Can't find $PGSQLDUMP in vserver $vsname."
+ fi