Backup windows share with rsbackup?
Richard Kettlewell
rjk at terraraq.org.uk
Tue Jun 20 18:45:58 BST 2017
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/
> 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.
ttfn/rjk
More information about the sgo-software-discuss
mailing list