How can I set duplicity to exclude all hidden files and folders from backing them up, without specifying each and every one of them?
How can I set duplicity to exclude all hidden files and folders from backing them up, without specifying each and every one of them?
The decision by the developer is to keep the options very simple. This has been requested several times, here and here are some bug reports/feature requests on the issue.
An easier way to achieve what you want is to add just the directories (/Documents, /Music, /Pictures, etc...) individually, instead of selecting the entire /Home directory. You likely have 10 or less folders in your /Home directory, so this is easier then manually excluding all the hidden folders and files.
It's a good question, but the answer is to use a workaround.
In duplicity's GUI ("Backup" / deja-dup), if you want to list dot-file in your excluded files, you may be having difficulty selecting them via the GUI.
This does NOT answer the question, but the other answers referred to command line non-solutions. This is a GUI non-solution.
A hidden file or directory starts with a dot (e.g.
.bash_history
,.cache/
). The pattern for that is.*
, so you can use the--exclude '.*'
option to exclude hidden files and directories. This option must come before other--include
patterns because:(from man duplicity)