Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie
    Join Date
    Aug 2005
    Sterling, VA

    need rsync expert

    I need some help with rsync. Let me explain what it is I'm trying to do. Let's say the root of my system looks like this...


    Now what I want to do is sync dir1 through dir10...basically grab the whole root and store it in /backups. And of course I want to exclude the /backups directory because that will have the backed up data.

    So I try this:

    rsync -avz --exclude=backups/ / /backups/

    That would work, except the /dir2/backups directory would also be skipped.

    Does anybody know of a way to be more specific about a directory you want skipped.

    To be more clear about what it is I want to do...

    I want to backup my entire hard drive, skipping things like /proc, /mnt, /dev, and the /backups directory I'll be making. I want to specifically exclude those directories, rather than specifically including the directories I want.

    Any help would be appreciated. Let me know if this is not clear and I will try and explain better.

    Thanks in advance,
    - EndianX -

  2. #2
    Linux Guru dylunio's Avatar
    Join Date
    Aug 2004
    rsync -avz --exclude=/backups/ / /backups/
    that states to exclude the backups directory in / .
    Registered Linux User #371543!
    Get force-get May The Source Be With You

  3. #3
    Linux Newbie
    Join Date
    Aug 2005
    Sterling, VA

    I tried that in my testing (a subset of directories) and it wasn't working. But since you said it would work I tried it on the real thing ( on / ) and it worked. I now have a script to make a copy of my drive, and a script to resync my files with it.

    Thank you for the help!
    - EndianX -

  4. $spacer_open

Posting Permissions

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