Re: [Nssbackup-team] [Question #234488]: lauching a task before backup

2013-09-18 Thread Anton
Question #234488 on sbackup changed:
https://answers.launchpad.net/sbackup/+question/234488

Anton requested more information:
That's nice to know!

Does sbackup read the exit status of the pre-backup script, so the script could 
allow or block starting of the backup?
Likewise, it would be good if the post-backup script could read/know the exit 
status of sbackup.

(Ubuntu LTS - 12.04 - is providing sbackup 0.11.4)

-- 
You received this question notification because you are a member of
Simple Backup Maintainers, which is an answer contact for sbackup.

___
Mailing list: https://launchpad.net/~nssbackup-team
Post to : nssbackup-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~nssbackup-team
More help   : https://help.launchpad.net/ListHelp


Re: [Nssbackup-team] [Question #234488]: lauching a task before backup

2013-09-17 Thread Jean-Peer Lorenz
Question #234488 on sbackup changed:
https://answers.launchpad.net/sbackup/+question/234488

Jean-Peer Lorenz proposed the following answer:
In sbackup 0.11.5 and newer support for Pre/Post backup script hooks was
added:

  It is completely optional. To use it, please add following options to your 
configuration file:
  ...
  [hooks]
  pre-backup = path to pre-backup script
  post-backup = path to pre-backup script
  ...
  You only need to specify scripts that should run, just leave it out if not
  required! Please note, the script must be executable (chmod +x) and will be
  run with same privileges as your backup process. So, be careful!

-- 
You received this question notification because you are a member of
Simple Backup Maintainers, which is an answer contact for sbackup.

___
Mailing list: https://launchpad.net/~nssbackup-team
Post to : nssbackup-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~nssbackup-team
More help   : https://help.launchpad.net/ListHelp


Re: [Nssbackup-team] [Question #234488]: lauching a task before backup

2013-08-26 Thread Anton
Question #234488 on sbackup changed:
https://answers.launchpad.net/sbackup/+question/234488

Anton posted a new comment:
/usr/share/sbackup/retry_backup:

#!/bin/bash
#
# retry running Sbackup if previous attempt failed
# used by pm to run at thaw/resume

# find config file and read some variables
my_dir=`dirname $0`
if [ -x $my_dir/get_conf ]; then
. $my_dir/get_conf
else # get from default location
. /usr/share/sbackup/get_conf
fi

# find backup schedule and check with latest succesful backup:
if [ -x /usr/share/sbackup/check_backup_schedule ]; then
/usr/share/sbackup/check_backup_schedule
if (( $? != 1 )); then
# no backup needed
exit 0
fi
fi

# check ping to backup host
# strip username, if needed:
buhost=`echo $buhost | sed 's/^.*@//'`
echo Checking ping average round-trip time (rtt) to $buhost
# get average ping time in micro seconds (so it can be integer, not real):
ping=`ping -c 10 $buhost | tail -1 | awk -F= '{print $2}' | awk -F/ '{print 
$2*1000}'`
ping_max=1000
if [ $ping -gt $ping_max ]; then 
echo Rtt is too slow ($ping; max $ping_max), not making backup now!
exit 0
fi

for sbackup in /usr/share/sbackup/sbackup-launch /usr/bin/sbackup 
/usr/sbin/sbackupd; do
if [ -x $sbackup ]; then
echo Launching $sbackup
$sbackup
exit 0
fi
done

#last line

-- 
You received this question notification because you are a member of
Simple Backup Maintainers, which is an answer contact for sbackup.

___
Mailing list: https://launchpad.net/~nssbackup-team
Post to : nssbackup-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~nssbackup-team
More help   : https://help.launchpad.net/ListHelp


Re: [Nssbackup-team] [Question #234488]: lauching a task before backup

2013-08-26 Thread Anton
Question #234488 on sbackup changed:
https://answers.launchpad.net/sbackup/+question/234488

Anton posted a new comment:
p.s., the scripts work for me. They should work for you, too, but I
cannot guarantee that. Please just ask if you run into problems.

-- 
You received this question notification because you are a member of
Simple Backup Maintainers, which is an answer contact for sbackup.

___
Mailing list: https://launchpad.net/~nssbackup-team
Post to : nssbackup-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~nssbackup-team
More help   : https://help.launchpad.net/ListHelp


[Nssbackup-team] [Question #234488]: lauching a task before backup

2013-08-23 Thread cedric
New question #234488 on sbackup:
https://answers.launchpad.net/sbackup/+question/234488

Hello,
What is the best way to launch a few commands before the backup starts ? I need 
to unmount and remount a volume.
Thank you for your help.
C├ędric

-- 
You received this question notification because you are a member of
Simple Backup Maintainers, which is an answer contact for sbackup.

___
Mailing list: https://launchpad.net/~nssbackup-team
Post to : nssbackup-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~nssbackup-team
More help   : https://help.launchpad.net/ListHelp