Quote:
|
Originally Posted by macemoneta
What version of rsync are you using?
|
Just apt-got (?) the latest during this fiasco. Matches yours.
Quote:
|
Originally Posted by macemoneta
Is /mnt/stuff a symlink?
|
You know, that may just be the case... hold on... nope. Yeah. I've created a test directory structure just to figure out this rsync problem.
Here's an actual tree listing of my testdir:
Quote:
sb7:/mnt/stuff# tree
.
|-- ohmygodlots (dir)
| |-- ohdir1 (dir)
| |-- ohlots2 (file)
| `-- ohlots3 (file)
`-- restofstuff (dir)
|-- ohmygodlots (dir)
| |-- ohrest1 (file)
| |-- ohrest2 (file)
| `-- ohrest3 (file)
|-- rest1 (file)
|-- rest2 (file)
`-- rest3 (file)
4 directories, 8 files
sb7:/mnt/stuff#
|
Did some more tests, and found that:
Quote:
sb7:/mnt/stuff# /usr/bin/rsync -avvxn --exclude=/ohmygodlots /mnt/stuff/ /mybackups/foobackup
building file list ...
[sender] hiding directory ohmygodlots because of pattern /ohmygodlots
done
created directory /mybackups/foobackup
delta-transmission disabled for local transfer or --whole-file
./
restofstuff/
restofstuff/rest1
restofstuff/rest2
restofstuff/rest3
restofstuff/ohmygodlots/
restofstuff/ohmygodlots/ohrest1
restofstuff/ohmygodlots/ohrest2
restofstuff/ohmygodlots/ohrest3
total: matches=0 hash_hits=0 false_alarms=0 data=0
sent 237 bytes received 74 bytes 622.00 bytes/sec
total size is 0 speedup is 0.00
|
Interesting how the exclude=/ohmygodlots skipped the first "root level" ohmygodlots, but not the one nested under "restofstuff". So as long as the --exclude= is set in reference
to the root of the backup path, it seems to work.
To restate it: Putting in the --exclude= as an absolute reference (/mnt/stuff/ohmygodlots)
will not work. It seems to only work as referenced from the path to the files to be rsync'd:
/mnt/stuff#
/usr/bin/rsync -avvxn --exclude=/ohmygodlots /mnt/stuff/ /mybackups/foobackup
Where:
/usr/bin/rsync - is the application (duh)
-avvxn is archive parameter, with vv for verbose debugging, and n for "don't really do this!" (for testing)
--exclude=/ohmygodlots - is the subtree we want to ignore, which is referenced from the root defined from...
/mnt/stuff - which is the path to start the rsync from
/mybackups/foobackup - the final output file name.
There. Hopefully that helps any other poor schmucks like myself that have been fighting with this.