Discussion:
Unison ignore options...
Roy
15 years ago
Permalink
Hi All,

I think unison is great - I'd probably think even more highly of it, if it
wasn't trying to drive me crazy! I just cannot seem to get the ignore options to
work the way I want.

What am I doing wrong?

I'm backing up a Linux partition/volume to a locally attached external disk:
root = /space
root = /media/external/backup/fedora/rubicon_space

I only want to backup/copy one way:
# Do not synchronise, just mirror (copy)...
force = /space

I only want to backup these paths:
# Paths to work on...
path = home
path = music
path = images

As you can imagine, the home directories e.g. "/space/home/rob" contain lots of
dross that doesn't need to be backed up.

E.g. I don't want to copy .thumbnails, so I put entries like these in the prf
file:
ignore = Path */.thumbnails
Or:
ignore = Path */*/.thumbnails

But unison seems to go ahead and scan these directories anyway.

If I use the UI to automagically configure a path to be ignored (to try and get
an example of the correct syntax), it writes a prf entry like this:
ignore = Path {home/rob/.cache}

I.e. It explicitly specifies the user, whereas I would ideally prefer to ignore
.cache in every users home directory.

(What are those curly braces about? From my reading of the documentation, they
are unnecessary in this case?)

I tried to debug the issue with "debug = stasher" - stasher looks like the right
component, but this doesn't seem to write useful debug output during the scan
phase and I am trying to avoid doing the copy until I have the ignores correctly
defined.

What would I write if I wanted to ignore a directory two levels down? I.e.
something like these:
$HOME/.picasa/dosdevices
$HOME/.local/share/tracker

Thanks in advance for any help!

Cheers,
Rob.





------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/unison-users/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/unison-users/join
(Yahoo! ID required)

<*> To change settings via email:
unison-users-***@yahoogroups.com
unison-users-***@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
unison-users-***@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
Kai Steinbach
15 years ago
Permalink
Hi Roy.
Post by Roy
E.g. I don't want to copy .thumbnails, so I put entries like these in the prf
ignore = Path */.thumbnails
ignore = Path */*/.thumbnails
But unison seems to go ahead and scan these directories anyway.
Path versus Name?
http://www.cis.upenn.edu/~bcpierce/unison/download/releases/stable/unison-manual.html#pathspec

Not that I would have ever read it ... I just used the 3 different
ignore items in the Win/GTK GUI.
This is what I have collected from various .prf files, and then moved
to a file called common-ignores.txt - which in turn gets included in
all .prf files by now.

ignore = Name ._*
ignore = Name {._}*
ignore = Name .#*
ignore = Name .DS_Store
ignore = Name .localized

ignore = Path {.TemporaryItems}
ignore = Path {._.TemporaryItems}
ignore = Path {System Volume Information}
ignore = Path {Recycled}
ignore = Path {$RECYCLE.BIN}
ignore = Path {RECYCLER}
ignore = Path {._.Trashes}
ignore = Path {.Trashes}

ignore = Name Thumbs.db
ignore = Name {,.}*{.ithmb}

perms = 0
rsrc = false

Hah, how funny what this list tells about my sync environment: Win /
Mac and iTunes.

Hope this helps. Kai


------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/unison-users/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/unison-users/join
(Yahoo! ID required)

<*> To change settings via email:
unison-users-***@yahoogroups.com
unison-users-***@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
unison-users-***@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
Bartosz SKOWRON
15 years ago
Permalink
Post by Kai Steinbach
ignore = Name ._*
ignore = Name {._}*
ignore = Name .#*
ignore = Name .DS_Store
ignore = Name .localized
any idea how to ignore 'Icon?' file? It's (probably) for modified
folder icons, OSX...


------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/unison-users/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/unison-users/join
(Yahoo! ID required)

<*> To change settings via email:
unison-users-***@yahoogroups.com
unison-users-***@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
unison-users-***@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/

Jerome Vouillon
15 years ago
Permalink
Hi,
Post by Roy
I'm backing up a Linux partition/volume to a locally attached
root = /space
root = /media/external/backup/fedora/rubicon_space
[...]
Post by Roy
E.g. I don't want to copy .thumbnails, so I put entries like these
ignore = Path */.thumbnails
ignore = Path */*/.thumbnails
But unison seems to go ahead and scan these directories anyway.
Paths are relative to the root. So the first ignore directive will
make unison skip, for instance, /space/home/.thumbnails. If you want
to ignore all .thumbnails directories, you can use:

ignore = Name .thumbnails
Post by Roy
If I use the UI to automagically configure a path to be ignored (to
try and get an example of the correct syntax), it writes a prf entry
like this: ignore = Path {home/rob/.cache}
I.e. It explicitly specifies the user, whereas I would ideally
prefer to ignore .cache in every users home directory.
Then, you can write:

ignore = Path home/*/.cache
Post by Roy
(What are those curly braces about? From my reading of the
documentation, they are unnecessary in this case?)
Indeed, they are not necessary in this case. But you have to use them
if the path ends with a whitespace.
Post by Roy
I tried to debug the issue with "debug = stasher" - stasher looks
like the right component, but this doesn't seem to write useful
debug output during the scan phase and I am trying to avoid doing
the copy until I have the ignores correctly defined.
What would I write if I wanted to ignore a directory two levels down? I.e.
$HOME/.picasa/dosdevices
$HOME/.local/share/tracker
That would be:

ignore = Path home/*/.picasa/dosdevices

-- Jerome


------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/unison-users/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/unison-users/join
(Yahoo! ID required)

<*> To change settings via email:
unison-users-***@yahoogroups.com
unison-users-***@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
unison-users-***@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
Continue reading on narkive:
Loading...