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

jw schultz jw at pegasys.ws
Wed Oct 22 16:57:37 EST 2003


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).

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

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

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

		Remember Cernan and Schmitt



More information about the rsync mailing list