How to backup files in /home/username
hi,
I have a backup for specific folders working fine, thanks very much, but would also like to backup all the files in "/home/username/"
Several apps ("print screen" etc) default to saving in that home folder and I'd like those to be included, but the names are not know at setup-time. Also I'd like to include "." files like ".bash_history" etc
I tried "add file" and manually adding to the file names being selected ".png" ".svg" but it dropped them off when I saved.
Is this possible? If not yet, could it be added?
Yes, this already works, but the Include list is the wrong place for wildcards. Include only takes real paths picked in the file dialog (they go to rsync as --include=<path> / --include=<path>/**), so a typed *.png isn't a file and gets dropped. Wildcards work in the Exclude tab.
So the usual setup is the other way round:
- In Include, add the folder
/home/usernameitself. That covers everything in it, including new files whose names you don't know yet and dotfiles like.bash_history. - Your specific folders under home are now covered by that, so you can remove them from Include (keeping them doesn't hurt).
- In Exclude, add what you don't want, e.g.
/home/username/Downloads,/home/username/VirtualBox VMs, or patterns like*.iso. The defaults already skip.cache, the trash and similar.
One thing to keep in mind: excludes are applied before includes (rsyncSuffix in common/snapshots.py), so an exclude always wins. A pattern like /home/username/*/ ("all subfolders") would also drop the folders you included explicitly, so exclude by name instead.
Hello FlailAway,
thank you for your question.
You asking for file patterns in the include list. This is not possible and would have several consequences if I would implement them. I just won't.
Why not add your complete home-folder to he include list?
Try to shape your backup workflow and report bugs; e.g. The behaviour you describe for "print screen" is simply a bug. No application should default store to the home folder.
I also wouldn't recommend to backup the complete home folder. This might be a symptom of lacy backup management. 😄
Best, Christian