duplicity-talk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Duplicity-talk] Avoid following symbolic links


From: Michael A. Sidenius
Subject: Re: [Duplicity-talk] Avoid following symbolic links
Date: Wed, 10 Jun 2009 15:00:03 +0200
User-agent: Internet Messaging Program (IMP) 4.3.3

Very good questions. Will do a small test to verify. I might have misunderstood the functionality. Thanks for pointing me in the right direction.
-Michael

Quoting Michael Terry <address@hidden>:

Doesn't duplicity correctly handle soft links (i.e. it backs them up
as soft links, it doesn't follow them)?

-mt

2009/6/10 Cristian KLEIN <address@hidden>:
Michael A. Sidenius a écrit :

Quoting Cristian KLEIN <address@hidden>:

Michael A. Sidenius a écrit :
Hi,

Would it be possible to make Duplicity avoid following symbolic (soft)
links?

The best solution would of cause be a command line option, but I could
live with a local patched version, if someone could point me to where to
do the change.

Without patching, you could run "find -type l" to get all symlinks, then
exclude them using --exclude-filelist or --exclude-filelist-stdin.

Good idea. Thanks for the input. Will be heavy on the processing though,
since it need to be updated every time I run Duplicity. My general
Duplicity script has the following syntax:

duplicity "bla..bla" $INCLUDE_GLOBBING_FILELIST --exclude /  /

so I have a whole bunch of backup sets in glob files, which I can put in
the include globbing variable. I have 3T of space, so running find from
/ every time I do a backup of a small subset would be rather overkill,
IMHO. If Duplicity could exclude the (few) soft links it finds in the
subset from the glob file, I believe it would be more "light weigth".

You are right. I was looking for the easiest solution which would not
require you to track the patch against duplicity.

In order to achieve this, you should edit selection.py. Use the other
"selection functions" as example. Ideally, you should add a new
selection function, which would look something like:

def nosymfollow_get_sf(self, filename):
 def exclude_sel_func(path):
   if path.issym():
     return 0
   else:
     return None

   sel_func = exclude_sel_func
   return sel_func



_______________________________________________
Duplicity-talk mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/duplicity-talk



_______________________________________________
Duplicity-talk mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/duplicity-talk








reply via email to

[Prev in Thread] Current Thread [Next in Thread]