Results 1 to 7 of 7

Thread: grsync and --exclude (newbie question)

  1. #1
    Join Date
    Dec 2009
    Beans
    5

    Question grsync and --exclude (newbie question)

    Hi,

    I'm new to linux and I have question about backup. I'm running karmic on a 64 bit deskttop and a 32bit netbook. I used grsync a couple of times to backup /home/ and it worked perfectly. Now I'd like to exclude a couple of directories and I ran into problem: based on several postings on the forum, I created a file

    /home/(user)/.grsync/exclude

    that contains the path

    /home/(user)/prog/bad

    and then in the grsync dialog box, under `advanced options' I added

    --exclude-from=/home/(user)/.grsync/exclude

    but grsync still backed up the directory I thought I excluded. I had tried a few other variations, including

    * adding double quotes around the path in the exclude file and/or the exclude-from command;

    * adding extra double-quotes at the end of the path in the excluded path

    * removing /home/ from the path and/or the --exclude-from command;

    * instead of using an exclusion file, used directly the command --exclude=/home//prog/bad (with or without double quotes and/or /)

    I must have missed something trivial; your comments and suggestions are most welcome!!

    (note: I had inadvertently posted this as a reply to another thread; newbie mistake...)

  2. #2
    Join Date
    Oct 2007
    Location
    Minnesota
    Beans
    510
    Distro
    Kubuntu 12.04 Precise Pangolin

    Re: grsync and --exclude (newbie question)

    I have

    --exclude-from /home/user/exclude.txt

    You have

    --exclude-from=/home/user/exclude.txt

    Try without the = sign maybe?
    Check out my Youtube channel for some awesome gaming videos, including Dragonforce, "Through the Fire and Flames" on Expert Performance Mode from Guitar Hero III. My Youtube Channel

  3. #3
    Join Date
    Dec 2009
    Beans
    5

    Re: grsync and --exclude (newbie question)

    Quote Originally Posted by x C0MMAND0 x View Post
    I have

    --exclude-from /home/user/exclude.txt

    You have

    --exclude-from=/home/user/exclude.txt

    Try without the = sign maybe?
    Thanks -- but it does not work for me

  4. #4
    Join Date
    Jun 2006
    Location
    Canada
    Beans
    516

    Re: grsync and --exclude (newbie question)

    You can add --exclude-from=".grsync/exclude" in the Additional Options (field) in the Advanced Option (tab)

    In the exclude file put the name of each subdirectory (one per line) that you would like to exclude. Example:
    Code:
    .thumbnails
    Downloads
    I have found that you can't put a full path like in your example:
    Code:
    /home/(user)/prog/bad
    If you hare backing up /home/(user), then you must only put the tail end of the path in the exclude file. This is the only way it will work:
    Code:
    prog/bad
    My Top Bugs - Launchpad Profile - Wiki Page

    Appreciate what the severe effort of many converging wills has produced.

  5. #5
    Join Date
    Dec 2006
    Beans
    117

    Re: grsync and --exclude (newbie question)

    I use something like --exclude /home/(user)/.grsync/exclude/*

    It copies the name of the directory, but none of the enclosed files. Would that work for your scenario?

  6. #6
    Join Date
    May 2008
    Location
    The Netherlands
    Beans
    2,151
    Distro
    Kubuntu 12.10 Quantal Quetzal

    Re: grsync and --exclude (newbie question)

    The man pages (man rsync) gave this:

    Code:
    --exclude-from=FILE
    This option is related to the --exclude option, but it specifies
    a FILE that contains exclude patterns  (one  per  line).   Blank
    lines  in  the  file  and  lines  starting  with  ’;’ or ’#’ are
    ignored.  If FILE is -, the list  will  be  read  from  standard
    input.
    So if this is what you have typed then it should be the file itself you use to exclude items.
    For more info type man rsync in a terminal and start reading. This program has a very long list of possibilities .
    DeMus

  7. #7
    Join Date
    Jul 2009
    Beans
    5

    Re: grsync and --exclude (newbie question)

    I am using /home/ as source destination and

    --exclude=*/.cache

    in the advanced options,

    and so far dry-run does not copy the .cache directory...

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
  •