1

I use rsync to backup my entire home folder, which includes configuration files for my software and desktop environment. When distro-hopping I don't want to save these configuration files, save for a few such as my browser or email client.

Configuration files in the home folder are always hidden or in hidden directories, so my solution is to have rsync backup all non-hidden files, and only backup hidden files contained in a whitelist, excluding all other hidden files.

How can I accomplish this with a single rsync command?

1 Answer 1

1

Create a file with hidden files/dirs if you need to backup

Example:

vim includeFile.list

.xpto.conf
.my.cfg

And execute rsync

rsync -avz --include-from=includeFile.list --exclude=".*" source/ destination/

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .