Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to make a backup of some specific files/folders of my $HOME to an external hard drive. I am using rsync with the following syntax:

rsync -avh --delete-excluded --exclude-from=.backup.lst $HOME/ BACKUP/

The backup.lst file includes the following:

    # Include
    + /Dev/
    + /Documents/
    + /Music/
    + /Pictures/
    + /.config/openbox/
    + /.config/tint2/
    + /.irssi/
    + /.mplayer/
    + /.backup.lst
    + /.bash_history
    + /.bash_profile
    + /.bashrc
    + /.conkyrc
    + /.fehbg
    + /.FehImage
    + /.htoprc
    + /.inputrc
    + /.rtorrent.rc
    + /
    + /.vimrc
    + /.xinitrc
    + /.Xresources

    # Exclude
    - /*

Everything is synced properly except .config/openbox/ and .config/tint2/

a) Is there some way to include these two folders?

b) In general, is the above syntax correct to properly backup these files? I would appreciate getting any other suggestions regarding backup with rsync.

share|improve this question

Just tried similar case myself. Apparently you've got to include the parents at all depths, and also remove the unwanted children using - /<deep-parent>/* in a later exclude rule(s) (at all the depths).

# Include 
+ /.mplayer/
+ /.config/
+ /.config/openbox/
+ /.config/tint2/

# Exclude
- /*
- /.config/*

Man page says the .config/* would not be considered at all if you dont put just .config/ because of the exclusion of /*

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.