Re: Rsync behaviour on harddisc crash

2010-03-18 Thread Mac User FR
Oh, sorry, I didn't get that the filesystem to check was the remote one. Now I get why the solution is so complex. Le 18 mars 2010 à 18:30, Paul Slootman a écrit : > On Thu 18 Mar 2010, Mac User FR wrote: > >> Wouldn't it be better to use conditional expressions from sh with a >> smaller footpr

Re: Rsync behaviour on harddisc crash

2010-03-18 Thread Paul Slootman
On Thu 18 Mar 2010, Mac User FR wrote: > Wouldn't it be better to use conditional expressions from sh with a > smaller footprint than rsync --list to check if the directory > exists? > I think on something like: > -d file > True if file exists and is a directory. That won't work to ch

Re: Rsync behaviour on harddisc crash

2010-03-18 Thread Linux Expert
On Thu, Mar 18, 2010 at 9:48 AM, Mac User FR wrote: > Wouldn't it be better to use conditional expressions from sh with a smaller > footprint than rsync --list to check if the directory exists? > I think on something like: > > -d file > True if file exists and is a directory. > > (sou

Re: Rsync behaviour on harddisc crash

2010-03-18 Thread Mac User FR
Wouldn't it be better to use conditional expressions from sh with a smaller footprint than rsync --list to check if the directory exists? I think on something like: -d file True if file exists and is a directory. (source: man sh) Cheers, Vitorio Le 18 mars 10 à 17:30, Linux Expert

Re: Rsync behaviour on harddisc crash

2010-03-18 Thread Linux Expert
Yes, it'll sync the source directory (now empty) to Server B, deleting everything due to the --delete option. One solution I use is to place a check for the existence of a subdirectory just before the rsync command in the script. This was you can make rsync contingent on the existence of that sub

Rsync behaviour on harddisc crash

2010-03-18 Thread Christian Röder
I was just pondering: Lets look at Server A with one extra harddisc hdb, where hdb1 is mounted at /mnt/folder. /mnt/folder is the folder which should be mirrored on Server B. So Server B rsyncs rsynch -a -delete server::folder /folder from Server A and gets all the new files and delete