Artificial intelligent assistant

Backup only hidden (dot) files with duplicity I would like to backup config files (hidden, starting with a dot) with duplicity. Only files, no directories. The following command duplicity --include '/home/foo/.*' --exclude '/home/foo/**' /home/foo sftp://myserver/backup --dry-run backups everything starting with a dot, thus config directories are also included. On the other hand duplicity --exclude '/home/foo/**' --include '/home/foo/.*' /home/foo sftp://myserver/backup --dry-run produces > Command-line include glob: /home/foo/.* 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. I have no other idea. How can I backup only files starting with a dot.

katonag,

try to add `--exclude '/home/foo/.*/'` or `--exclude '/home/foo/.*/**'` in the beginning eg.


--exclude '/home/foo/.*/' --include '/home/foo/.*' --exclude '**'


.

duplicity tests in/exclude by given order. so the above translates to


- /home/foo/.*/
+ /home/foo/.*
- **


where the first matches `.folder` but not the `.file`, which is matched by the second directive and the third excludes everything else.

if `/home/foo/.*/` does not work, try `/home/foo/.*/**`. that is because the duplicity matching code might not differentiate between files and folders, i have no time to test that.

good luck.. ede/duply.net

PS: there is a chapter in the duplicity man page about in/exclusion <

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 824addfd48bd04161a093f3f8a17145e