Re: rsync - how to exclude?
Gary Dale wrote:[color=blue]
> I'm running rsync 2.6.9 on a Debian/Etch system.
> I'm getting an:
> rsync: connection unexpectedly closed (6125888 bytes received so far)
> rsync error: error in rsync protocol data stream (code 12) at io.c(453)
> when I try to run rsync. I'm running it as root for this test, and also
> have it set up in cron to be run as root. However rsync dies before
> completing the backup.
> my command line is:
> rsync -av /home/ /backup --exclude-from=/etc/cron.daily/exclude.txt
> (I leave out the -v option in the cron job).
> What I'm trying to do is make a backup of /home to /backup on another
> drive. I have a list of excludes in exclude.txt that looks like this:
> (I've also tried using the +/- format, which - if I read the man page
> correctly - is optional when using the --exclude parameter instead of
> Before the above errors I also have several errors referring to files in
> /backup/lost+found, such as:
> rsync: symlink "/backup/lost+found/166170_166203" -> "" failed: No such
> file or directory (2)
> I'm confused as to why they are there, since I have told rsync to not
> look at lost+found. However, I think this is where rsync is having
> It is also copying /home/swap1, despite my best efforts to stop it.
> Can anyone tell me what I'm doing wrong?[/color]
Nevermind - silly mistake. The exclude paths have to be relative to
folder being copied.