Results 1 to 5 of 5

Thread: [SOLVED] Rsync vanished files, when using exclude=

  1. #1
    Join Date
    Apr 2008
    Location
    Netherlands
    Beans
    21
    Distro
    Ubuntu

    Question [SOLVED] Rsync vanished files, when using exclude=

    As you hopefully know (otherwise you cannot help me), rsync first searches the filesystems for files to copy, before it continues to actually copy them.

    Now, the problem is that when I backup our webserver, the /var/www rsync returns an error 24 status. Several files in there vanish.

    The vanished files are session files, that start with sess_*

    I would expect when I exclude those, there will be no code 24 (vanished files) errors or return values, right ? Such as: rsync -avz --exclude=svn_* root@server:/var/www /backup/server/

    This is not the case! Even when I exclude these files, it still complains about them.

    I could simply ignore the return value of 24 ofcourse. But that is not a pretty way to do things. Also because I only don't want to copy any session files; If something else causes this error than my session files, I would like the non-null return value.

    Does anyone have an idea on how to fix this cleanly? Or do I need to hack the source?

    The rsync version I use is from Ubuntu 8.04 Server.

  2. #2
    Join Date
    Jun 2008
    Beans
    14
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Rsync vanished files, when using exclude=

    do :
    Code:
    rsync --help
    man rsync
    and try to see how to do this

  3. #3
    Join Date
    Apr 2008
    Location
    Netherlands
    Beans
    21
    Distro
    Ubuntu

    Re: Rsync vanished files, when using exclude=

    Quote Originally Posted by imneo View Post
    do :
    Code:
    rsync --help
    man rsync
    and try to see how to do this

    spare yourself and me the time of this post...

  4. #4
    Join Date
    Apr 2008
    Location
    Netherlands
    Beans
    21
    Distro
    Ubuntu

    Cool Re: Rsync vanished files, when using exclude=

    Turns out the path in --exclude is relative to the path being copied. I.e.:

    You want to backup /var/log, but nog /var/log/apache2, then;

    you cannot: rsync -a --exclude=/var/log/apache2 user@host:/var/log /backup

    but you must: rsync -a --exclude=/apache2 user@host:/var/log /backup

    This is not at all obvious from the man-page. In fact there is no mention of it.

    Well thanks again for your "help"

  5. #5
    Join Date
    Mar 2007
    Location
    Denver, CO
    Beans
    7,554
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: [SOLVED] Rsync vanished files, when using exclude=

    Great find, thanks for the info.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •