rsync - how to exclude? - Linux

This is a discussion on rsync - how to exclude? - Linux ; 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) [generator] rsync error: error in rsync protocol data stream (code 12) at io.c(453) when I try to run rsync. I'm ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: rsync - how to exclude?

  1. rsync - how to exclude?

    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)
    [generator]
    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:

    /home/swap1
    /home/lost+found/*

    (I've also tried using the +/- format, which - if I read the man page
    correctly - is optional when using the --exclude parameter instead of
    --filter)

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

    It is also copying /home/swap1, despite my best efforts to stop it.

    Can anyone tell me what I'm doing wrong?

  2. Re: rsync - how to exclude?

    Gary Dale wrote:
    > 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)
    > [generator]
    > 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:
    >
    > /home/swap1
    > /home/lost+found/*
    >
    > (I've also tried using the +/- format, which - if I read the man page
    > correctly - is optional when using the --exclude parameter instead of
    > --filter)
    >
    > 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
    > problems.
    >
    > It is also copying /home/swap1, despite my best efforts to stop it.
    >
    > Can anyone tell me what I'm doing wrong?



    Nevermind - silly mistake. The exclude paths have to be relative to
    folder being copied.

+ Reply to Thread