Julian Davchev
2008-Jan-29 13:01 UTC
rsync ignores include rule - analogic to other that works
Hi,
I have this rsync to backup specific directories from one PC to another
in local network.
All is working smooth except for /storage dir. I just don't get why as I
am using
exact same why as I do for other dirs that work.
I see that it matches it like e.g
[sender] showing directory /storage because of pattern /storage/
..........
But then again there is no /storage/** like for etc for example.
[sender] showing directory /etc because of pattern /etc/
[sender] showing file /etc/csh.login because of pattern /etc/**
........
So at the end /storage dir is created but no content inside. Is it
possible reason
that it is too huge and/or too many files inside? But I don't see any
error on -vv
Here is script I use
export RSYNC_RSH="ssh -o Compression=no -x";
rsync -aHvx \
--include-from=backup.includes \
--progress --numeric-ids --delete \
--delete-excluded --relative --verbose \
/ root@192.168.1.10:/root/backup/laptop/lin/
---------------------------------------
backup.includes
+ /etc/
+ /etc/**
+ /var/
+ /var/log/
+ /var/log/**
+ /root/
+ /root/**
+ /usr/
+ /usr/local/
+ /usr/local/**
+ /storage/
+ /storage/**
- *
Matt McCutchen
2008-Jan-29 13:31 UTC
rsync ignores include rule - analogic to other that works
On Tue, 2008-01-29 at 15:01 +0200, Julian Davchev wrote:> I have this rsync to backup specific directories from one PC to another > in local network. > All is working smooth except for /storage dir. I just don't get why as I > am using > exact same why as I do for other dirs that work. > > I see that it matches it like e.g > [sender] showing directory /storage because of pattern /storage/ > .......... > > But then again there is no /storage/** like for etc for example. > [sender] showing directory /etc because of pattern /etc/ > [sender] showing file /etc/csh.login because of pattern /etc/** > ........ > > > So at the end /storage dir is created but no content inside. Is it > possible reason > that it is too huge and/or too many files inside? But I don't see any > error on -vv > > Here is script I use > > export RSYNC_RSH="ssh -o Compression=no -x"; > rsync -aHvx \ > --include-from=backup.includes \ > --progress --numeric-ids --delete \ > --delete-excluded --relative --verbose \ > / root@192.168.1.10:/root/backup/laptop/lin/ > > --------------------------------------- > backup.includes > + /etc/ > + /etc/** > + /var/ > + /var/log/ > + /var/log/** > + /root/ > + /root/** > + /usr/ > + /usr/local/ > + /usr/local/** > + /storage/ > + /storage/** > - *Is /storage on a different filesystem from / ? If so, the contents of the directory are being excluded by the -x (--one-file-system) option. Remove this option. Or, if you want to include the contents of /storage but not other things on non-root filesystems, then give /storage as an additional source argument: ?rsync -aHvx \ --include-from=backup.includes \ --progress --numeric-ids --delete \ --delete-excluded --relative --verbose \ / /storage root@192.168.1.10:/root/backup/laptop/lin/ This takes advantage of the behavior mentioned in the man page description of -x: "This does not limit the user?s ability to specify items to copy from multiple filesystems, just rsync?s recursion through the hierarchy of each directory that the user specified". If the -x isn't the issue, I don't know what is going on because I set up your scenario with rsync 2.6.9 and it copied the contents of /storage correctly. Matt