<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2017-06-20 19:45 GMT+02:00 Richard Kettlewell <span dir="ltr"><<a href="mailto:rjk@terraraq.org.uk" target="_blank">rjk@terraraq.org.uk</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">On 2017-06-20 18:53, Samuel Wolf wrote:<br>
> 2017-06-17 18:50 GMT+02:00 Richard Kettlewell <<a href="mailto:rjk@terraraq.uk">rjk@terraraq.uk</a><br>
</span>> <mailto:<a href="mailto:rjk@terraraq.uk">rjk@terraraq.uk</a>>>:<br>
<span class="gmail-">><br>
>     Hi,<br>
><br>
>     On 2017-06-16 15:56, Samuel Wolf wrote:<br>
>     > Hi,<br>
>     ><br>
>     > I search for an solution to backup a windows share with rsbackup.<br>
>     ><br>
>     > My first idea was a pre-host script to mount the windows share direct on<br>
>     > the rsbackup server (tmp dir).<br>
>     > Unfortunately rsbackup mean this is a local share and try to backup it<br>
>     > also if the windows client was down.<br>
><br>
>     Thanks for using rsbackup. It ought to be possible to use your original<br>
>     strategy, but without more information I don't know why it didn't work.<br>
>     I have a couple of questions:<br>
><br>
>     1. What version of rsbackup are you using?<br>
>     2. What is the contents of your hook script?<br>
><br>
>     ttfn/rjk<br>
><br>
><br>
> At the moment Debian Jessie:<br>
> ii rsbackup 1.1-4 amd64 rsync-based backup utility<br>
<br>
</span>That version is very out of date; please try the latest release from<br>
<a href="http://www.greenend.org.uk/rjk/rsbackup/" rel="noreferrer" target="_blank">http://www.greenend.org.uk/<wbr>rjk/rsbackup/</a></blockquote><div><br></div><div>Upgrade to rsbackup 4.0-1<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
<span class="gmail-"><br>
> My pre-script:<br>
> #/bin/bash<br>
> DESTHOST=windowsclient<br>
> mount -t cifs //${DESTHOST}/DATA$ /mnt/${DESTHOST} -o<br>
> username=rsbackup,password=<wbr>xxx,domain=${DESTHOST}<br>
> IS_MOUNTED=`mount | grep ${DESTHOST}`<br>
> if [ "x$IS_MOUNTED" = x ] ; then<br>
>                 echo "${DESTHOST} not mounted."<br>
>                 exit 1<br>
> fi<br>
> exit 0<br>
><br>
> Now I add a host in rsbackup:<br>
><br>
> host windowsclient<br>
>   hostname localhost<br>
>   volume data /mnt/windowsclient<br>
>     pre-backup-hook /etc/rsbackup/scripts/pre-<wbr>backup-windowsclient.sh<br>
><br>
> Issue now, rsbackup thinks with "localhost" the client is every time<br>
> online, but this is not the case.<br>
> In the worst case rsbackup copy an empty folder from /mnt/windowsclient.<br>
<br>
</span>What is supposed to happen is that when the pre-backup-hook fails,<br>
rsbackup does not backup that volume. See the check on rc in<br>
<a href="https://github.com/ewxrjk/rsbackup/blob/master/src/MakeBackup.cc#L301" rel="noreferrer" target="_blank">https://github.com/ewxrjk/<wbr>rsbackup/blob/master/src/<wbr>MakeBackup.cc#L301</a><br>
for instance. So if the issue persists with the current version, check<br>
what exit status your script produces when the mount operation fails.<br></blockquote><div><br></div><div>This work as expected, <span id="gmail-result_box" class="gmail-short_text" lang="en"><span class="gmail-">unfortunately my cron job send me now hourly a mail:</span></span></div><div><span id="gmail-result_box" class="gmail-short_text" lang="en"><span class="gmail-">/etc/cron.hourly/rsbackup:<br>WARNING: backup of tester:daten to hddbackupserver: preBackup: exited with status 1<br>ping: tester: Name or service not known<br>umount: /mnt/tester: not mounted<br></span></span></div><div><span id="gmail-result_box" class="gmail-short_text" lang="en"><span class="gmail-"></span></span></div><br>I use an non existing DESTHOST to simulate the real host is offline.<br>Any idea to suppress this errors?<br>Is there a way to accept a pre-host error code like "not online, skip"?</div><div class="gmail_quote"><br></div><div class="gmail_quote">rsbackup is a create software, thank you!</div><div class="gmail_quote"><br></div><div class="gmail_quote">Samuel<br></div><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
ttfn/rjk<br>
</blockquote></div><br></div></div>