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
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.