[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Duplicity-talk] specifying directories to backup
From: |
Kenneth Loafman |
Subject: |
Re: [Duplicity-talk] specifying directories to backup |
Date: |
Fri, 27 Jul 2007 11:08:02 -0500 |
User-agent: |
Thunderbird 1.5.0.12 (X11/20070604) |
Benjamin Montgomery wrote:
> Hi everyone, I need some help with telling duplicity what directories I
> want backup up on my server. My goal is to have a script that runs
> duplicity with "/" as the input directory but only does a backup for
> certain directories on my system that I specify.
>
> I tried creating a file with the directories I want and using the
> following:
>
> duplicity --exclude "**" --include-filelist include-files / file:///tmp/
>
> but I get this error:
>
> Last selection expression:
> Filelist: include-files
> only specifies that files be included. Because the default is to
> include all files, the expression is redundant. Exiting because this
> probably isn't what you meant.
>
> The include file looks like:
> /usr/local
> /var/www
>
> If I swap the order of the include and exclude options, duplicity runs,
> but the archive it creates only has the top-level directories and none
> of the files or subdirectories in the directories.
>
> I've been looking at the manpage, but I'm stumped. Can anyone help me
> with how to tell duplicity to do the above? Ideally, I'd like to be
> able to list the include directories in a file, but any suggestions
> would be appreciated!
The --include-filelist, --exclude-filelist include and exclude file
names, not file patterns. To get file patterns you need to use the
command line --include or --include-globbing-filelist or the mirrored
exclude options, so for your case, a single file will do the deed.
In a file called 'filelist' put:
+ /usr/local
+ /var/www
- **
then run duplicity with:
duplicity --include-globbing-filelist 'filelist' / file:///tmp
which is equivalent to:
duplicity --include '/usr/local' --include '/var/www' --exclude '**' \
/ file:///tmp
The man page is pretty terse. Watch out for the use of 'filename'
versus 'pattern'. It really does mean what it says.
...Ken
signature.asc
Description: OpenPGP digital signature