rsync --dry-run --link-dest problem

Russell Senior seniorr at aracnet.com
Wed Oct 22 17:16:04 EST 2003


>>>>> "jw" == jw schultz <jw at pegasys.ws> writes:

jw> On Tue, Oct 21, 2003 at 11:29:04PM -0700, Russell Senior wrote:
>>  I am trying to use rsync for making snapshots, sharing hardlinks
>> at the destination using the --link-dest option.  In conjunction
>> with this, I would like for --dry-run to report some reliable-ish
>> number for how much space it is going to consume at the destination
>> so that I can arrange to free such space prior the launching rsync
>> "for effect".  Right now, that isn't working:
>> 
>> # uname -a Linux <hostname> 2.4.22 #2 Wed Oct 8 20:17:18 PDT 2003
>> i686 GNU/Linux
>> 
>> # rsync --version rsync version 2.5.6 protocol version 26 Copyright
>> (C) 1996-2002 by Andrew Tridgell and others
>> <http://rsync.samba.org/> Capabilities: 64-bit files, socketpairs,
>> hard links, symlinks, batchfiles, IPv6, 64-bit system inums, 64-bit
>> internal inums
>> 
>> # rsync -v -a -H --dry-run --exclude=/proc --exclude=/mnt --delete
>> --link-dest=../2003-10-21/ / 2003-10-21c/ building file list
>> ... done created directory 2003-10-21c/ rsync: push_dir
>> 2003-10-21c/: No such file or directory rsync error: errors
>> selecting input/output files, dirs (code 3) at main.c(328) rsync:
>> connection unexpectedly closed (8 bytes read so far) rsync error:
>> error in rsync protocol data stream (code 12) at io.c(165)
>> 
>> The destination is mounted under /mnt (which explains that
>> exclusion).

jw> When you do a --dry-run it won't create directories.  This means
jw> that --dry-run won't work if the destination directory doesn't
jw> exist.  I'm sure you control whether or not the destination
jw> directory exists.

jw> If the real destination is empty or non-existant doing a --dry-run
jw> with the eventual link-dest directory as the destination will
jw> yield the list of what has changed.

Ah.  Clever.  But that isn't going to tell me how much space is going
to get consumed for directories, which in a deep tree might not be
trivial.

-- 
Russell Senior         ``shtal latta wos ba padre u prett tu nashtonfi
seniorr at aracnet.com      mrlosh''  -- Bashgali Kafir for ``If you have
                         had diarrhoea many days you will surely die.''



More information about the rsync mailing list