Backup windows share with rsbackup?
Richard Kettlewell
rjk at terraraq.org.uk
Sat Jan 13 15:11:32 GMT 2018
On 2018-01-05 17:24, Samuel Wolf wrote:
> > 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 <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
'tester' doesn't appear in the quoted configuration, so I think this
must be from other host.
ttfn/rjk
More information about the sgo-software-discuss
mailing list