Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm backing up using Duplicity, great tool. I'm unable to include files in the backup that are within a directory that is a symlink.

Using the following:

duplicity <dup args> --include /var/www/**/current --exclude '**'

duplicity will only backup the symlink I've tried:

duplicity <dup args> --include /var/www/**/current/* --exclude '**'
# and
duplicity <dup args> --include /var/www/**/current/** --exclude '**'

Not even then symlink is backed up.

the "current" directory links to directory like: /var/www/

The files contains a few static html & css files. I want those files to be backed up, regardless of which sha'd directory "current" points to.

Any help appreciated.

share|improve this question
up vote 10 down vote accepted

Duplicity doesn't follow symlinks by design. This is because if you tried to restore from that, it'd restore the actual files, and not a symlink! It's not a very good backup if it doesn't restore things to the way they were before. It should, however, be able to backup the symlink itself, and then you should make a backup of the symlink'd data separately.

share|improve this answer
Yeh my script just need to be a little smarter about the way it decides what's going to be included. Thanks for the information. – Rob Oct 5 '12 at 15:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .