Backup windows share with rsbackup?

Samuel Wolf samuelwolf85 at googlemail.com
Fri Jan 5 17:24:01 GMT 2018


2017-06-20 19:45 GMT+02:00 Richard Kettlewell <rjk at terraraq.org.uk>:

> On 2017-06-20 18:53, Samuel Wolf wrote:
> > 2017-06-17 18:50 GMT+02:00 Richard Kettlewell <rjk at terraraq.uk
> > <mailto:rjk at terraraq.uk>>:
> >
> >     Hi,
> >
> >     On 2017-06-16 15:56, Samuel Wolf wrote:
> >     > Hi,
> >     >
> >     > I search for an solution to backup a windows share with rsbackup.
> >     >
> >     > My first idea was a pre-host script to mount the windows share
> direct on
> >     > the rsbackup server (tmp dir).
> >     > Unfortunately rsbackup mean this is a local share and try to
> backup it
> >     > also if the windows client was down.
> >
> >     Thanks for using rsbackup. It ought to be possible to use your
> original
> >     strategy, but without more information I don't know why it didn't
> work.
> >     I have a couple of questions:
> >
> >     1. What version of rsbackup are you using?
> >     2. What is the contents of your hook script?
> >
> >     ttfn/rjk
> >
> >
> > At the moment Debian Jessie:
> > ii rsbackup 1.1-4 amd64 rsync-based backup utility
>
> That version is very out of date; please try the latest release from
> http://www.greenend.org.uk/rjk/rsbackup/


Upgrade to rsbackup 4.0-1


>
>
> > My pre-script:
> > #/bin/bash
> > DESTHOST=windowsclient
> > mount -t cifs //${DESTHOST}/DATA$ /mnt/${DESTHOST} -o
> > username=rsbackup,password=xxx,domain=${DESTHOST}
> > IS_MOUNTED=`mount | grep ${DESTHOST}`
> > if [ "x$IS_MOUNTED" = x ] ; then
> >                 echo "${DESTHOST} not mounted."
> >                 exit 1
> > fi
> > exit 0
> >
> > Now I add a host in rsbackup:
> >
> > host windowsclient
> >   hostname localhost
> >   volume data /mnt/windowsclient
> >     pre-backup-hook /etc/rsbackup/scripts/pre-backup-windowsclient.sh
> >
> > Issue now, rsbackup thinks with "localhost" the client is every time
> > online, but this is not the case.
> > In the worst case rsbackup copy an empty folder from /mnt/windowsclient.
>
> What is supposed to happen is that when the pre-backup-hook fails,
> rsbackup does not backup that volume. See the check on rc in
> https://github.com/ewxrjk/rsbackup/blob/master/src/MakeBackup.cc#L301
> for instance. So if the issue persists with the current version, check
> what exit status your script produces when the mount operation fails.
>

This work as expected, unfortunately my cron job send me now hourly a mail:
/etc/cron.hourly/rsbackup:
WARNING: backup of tester:daten to hddbackupserver: preBackup: exited with
status 1
ping: tester: Name or service not known
umount: /mnt/tester: not mounted

I use an non existing DESTHOST to simulate the real host is offline.
Any idea to suppress this errors?
Is there a way to accept a pre-host error code like "not online, skip"?

rsbackup is a create software, thank you!

Samuel


>
> ttfn/rjk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.chiark.greenend.org.uk/pipermail/sgo-software-discuss/attachments/20180105/3bf22432/attachment.html>


More information about the sgo-software-discuss mailing list