Search code examples
backupwildcardduplicity

Duplicity include with wildcards


I want to backup all homes of my lxc containers with duplicity and i use (commandline simplified to the problem):

duplicity --include '/data/lxc/**/rootfs/home' --exclude '/data/lxc'

which does not match the homes, while

duplicity --include '/data/lxc/oneofthecontainers/rootfs/home' --exclude '/data/lxc'

works.

further testing shows, that

duplicity --include '/data/lxc/oneofthecontainers/rootfs/home/**' --exclude '/data/lxc'

does not work either. The manpage of duplicity tells me first match wins and * and ** are allowed as wildcards, where ** matches everything and * only one path component.


Solution

  • I still do not know, why this does not work, but i solved it with --include-globbing-filelist and a filelist with "+ " and "- " entries for includes/excludes and now it works.