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

jw schultz jw at pegasys.ws
Wed Oct 22 17:33:27 EST 2003


On Wed, Oct 22, 2003 at 12:16:04AM -0700, Russell Senior wrote:
> >>>>> "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.

If you are that tight on space the filesystem will be badly
fragmented.  You can run find -type d on the local space
(doing exclusions) to get the directory list.  If you want
info of that degree of detail you can expect to have to work
for it.

-- 
________________________________________________________________
	J.W. Schultz            Pegasystems Technologies
	email address:		jw at pegasys.ws

		Remember Cernan and Schmitt



More information about the rsync mailing list