SearchFAQMemberlist Log in
Reply to topic Page 1 of 1
How to cancel rsnapshot if remote filesystems are not mounte
Author Message
Post How to cancel rsnapshot if remote filesystems are not mounte 
On Sunday 30 September 2007 18:06, Sérgio Araújo wrote:
Greetings,

Here's a problem we're facing:

Our rsnapshot server uses rsync over ssh to backup several Windows
servers, which are behind Linux firewalls.

What we have been doing is mounting the Windows NTFS/FAT32 filesystems
into the Linux firewalls, which are then available to the rsnapshot
server using rsync over ssh.

This has been working great for quite a few time now, but sometimes one
of the Windows servers is down for some reason, so it's filesystems are
not mounted on the Linux firewall, and so the rsnapshot silently runs
copying *nothing* from the folder where used to be 30 GBytes.

Can you think of a quick way to "cancel" rsnapshot if the remote folder
is empty, or if the remote filesystems are not mounted, or something
like that ?

Before running rsnapshot, test that the remote dir is accessible, possibly by
running rsync without a target defined, so that it returns a file listing.
eg in a shell script

testit=`rsync root < at > 1.2.3.4:/my/path/ 2>&1 | grep 'failed:' | wc -l`
if [ $testit = 1 ]; then
exit
fi

the above line will return 1 if the dir cannot be reached (or does not exist)
otherwise it returns 0.



Regards,

--
-----------------
Bob Hutchinson
Midwales dot com
-----------------

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss

Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
  


Magic SEO URL for phpBB