Exclude subfolders in included directories with exclude globbing filelist

Asked by Martin Abbrent

I'm using Duply [1] as simple frontend for Duplicity but this forces me to use an exclude globbing filelist to specify which files I want to backup. Now I want to exclude a subfolder of an included directory but it is getting backed up every time I start it. I force full backups for testing.

This is my exclude file list:

+ /etc
+ /root
+ /var
+ /home
- /root/.cache
- /var/cache
- /var/lib/dpkg
- /var/lib/apt
- **

I also tried to add slashes and double "*" to the excluded ones. Duply runs the following command:

duplicity full --name 'duply_myname' --encrypt-key # --sign-key # --verbosity '4' --gpg-options '--compress-algo=bzip2 --bzip2-compress-level=9' --full-if-older-than 1M --volsize 100 --exclude-globbing-filelist /etc/duply/myname/exclude / s3://amazon-desitination/dir

Does anybody see the mistake?

Thank you,
Martin

[1] http://duply.net/

Question information

Language:
English Edit question
Status:
Solved
For:
Duplicity Edit question
Assignee:
No assignee Edit question
Solved by:
edso
Solved:
Last query:
Last reply:
Revision history for this message
Best edso (ed.so) said :
#1

On 09.03.2014 00:31, Martin Abbrent wrote:
> New question #245190 on Duplicity:
> https://answers.launchpad.net/duplicity/+question/245190
>
> I'm using Duply [1] as simple frontend for Duplicity but this forces me to use an exclude globbing filelist to specify which files I want to backup. Now I want to exclude a subfolder of an included directory but it is getting backed up every time I start it. I force full backups for testing.
>
> This is my exclude file list:
>
> + /etc
> + /root
> + /var
> + /home
> - /root/.cache
> - /var/cache
> - /var/lib/dpkg
> - /var/lib/apt
> - **
>
> I also tried to add slashes and double "*" to the excluded ones. Duply runs the following command:
>
> duplicity full --name 'duply_myname' --encrypt-key # --sign-key # --verbosity '4' --gpg-options '--compress-algo=bzip2 --bzip2-compress-level=9' --full-if-older-than 1M --volsize 100 --exclude-globbing-filelist /etc/duply/myname/exclude / s3://amazon-desitination/dir
>
> Does anybody see the mistake?
>

yes. ex/inclusions are checked from top to bottom for each path. there is a detailed description on the duplicity manpage
 http://duplicity.nongnu.org/duplicity.1.html#sect10

long story short. order the list by path depths descending, long first, so that a deeper folder is not masked by a more generic parent folder definition.

..ede/duply.net

Revision history for this message
Martin Abbrent (h018c) said :
#2

Thanks edso, that solved my question.

Revision history for this message
Martin Abbrent (h018c) said :
#3

Thank you edso, changing the order solved my problem. My exclude file list now looks like this:

- /root/.cache
- /var/cache
- /var/lib/dpkg
- /var/lib/apt
+ /etc
+ /root
+ /var
+ /home
- **

> there is a detailed description on the duplicity manpage
> http://duplicity.nongnu.org/duplicity.1.html#sect10

I've read the man page but I didn't got it.