Results 1 to 3 of 3

Thread: rsync: exceptions to --exclude-from

  1. #1
    Join Date
    Dec 2004
    Location
    Barcelona
    Beans
    8
    Distro
    Ubuntu 9.10 Karmic Koala

    rsync: exceptions to --exclude-from

    Hi.

    I have a cron job that backs up some files over to an external disk.

    It ignores the hidden folders in my home dir, by using the --exclude-from option.

    However, there is one specific hidden dir that I do want to back up.

    Is there some way to add an exception to the list of exclusions?

    Many thanks.

    --
    Eduard Capell

  2. #2
    Join Date
    Jul 2009
    Location
    London
    Beans
    1,480
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: rsync: exceptions to --exclude-from

    Hi,
    Code:
    --include=.somedir --exclude-from=filewithpatterns
    the order is important, excluding first, then including won't work.

  3. #3
    Join Date
    Dec 2007
    Location
    Gainesville, Florida
    Beans
    Hidden!
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: rsync: exceptions to --exclude-from

    you can also create an exclude file. Whatever file types, files, or directories you place in that file will be excluded.

    for instance you create a file called rsync_excludes:
    Code:
    .somedir
    .gvfs
    *.o
    somedir/subdir
    usage:
    rsync --exclude-from=rsync_excludes

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
  •