Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

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'm trying to build a comprehensive filter / exclude file, to prevent backuping stuff that doesn't make sense do backup, such as temporary / cache data or easily recreatable files. I would appreciate if you could share (part of) your exclude list for rsync backups.

Here is what I have so far:

## Universal excludes


# backup text files (e.g. from Emacs)
- *~
- \#*\#

# Commonly distributed Mac OS X cache
- .DS_Store

# Commonly distributed Windows cache
- Thumbs.db

## Root file system
- /dev/
- /etc/modules.conf
- /media/
- /proc/
- /sys/
- /tmp/
- /usr/portage/
- /usr/src/
- /var/tmp/
- /var/log/

# Of the mounted stuff, whitelist only my two data partitions
- /mnt/
+ /mnt/data1
+ /mnt/data2

# Common package managers (apt, yum)
- /var/cache/apt/
- /var/cache/yum/

## Filters for home dirs (assumes /home/<user> dir structure)

# Cache
- /home/*/.cache/

# Downloads
- /home/*/Downloads/
+ /home/*/Downloads/src/

# Dropbox
- /home/*/Dropbox

# Temporary files / cache
- /home/*/.local/share/Trash
- /home/*/.cache
- /home/*/.Trash

# X Windows System
- /home/*/.xsession-errors*

# Gnome temp stuff
- /home/*/.compiz*/session
- /home/*/.gksu.lock
- /home/*/.gvfs

# Common Applications

# Adobe Reader
- /home/*/.adobe/**/AssetCache/
- /home/*/.adobe/**/Cache/
- /home/*/.adobe/**/Temp/
- /home/*/.adobe/**/UserCache.bin

# Dropbox temp stuff
- /home/*/.dropbox/
- /home/*/.dropbox-dist/

# Gimp
- /.gimp-*/tmp
- /.gimp-*/swap

# Mozilla Firefox
- /home/*/.mozilla/firefox/*/Cache/
- /home/*/.mozilla/firefox/*/lock
- /home/*/.mozilla/firefox/*/.parentlock

# Mozilla Thunderbird
- /home/*/.mozilla-thunderbird/*/lock
- /home/*/.mozilla-thunderbird/*/.parentlock

# Pidgin (accounts.xml contains passwords in clear text)
- /home/*/.purple/accounts.xml

What else do you think would be useful to add to this filter file, or what do you use and why?

share|improve this question

closed as not constructive by jasonwryan, Mat, warl0ck, Renan, Gilles Sep 16 '12 at 22:36

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

Comprehensive as in every current Unix platform? – Jodie C Sep 16 '12 at 4:19
You mean distro? Not necesarilly. – leden Sep 16 '12 at 6:48
No, not distros. I mean HP-UX, Solaris, AIX, FreeBSD, etc. – Jodie C Sep 16 '12 at 20:38
There are some things in there that I'd back up and some additional things that I wouldn't back up, but this is all very system-specific. The only general advice is that you should at least back up everything that can't be re-created easily, and you should not back up stuff accessed through unvetted mount points. Beyond that, if you don't know how important a particular file is, ask about that particular file. – Gilles Sep 16 '12 at 22:38
up vote 1 down vote accepted

I usually also exclude:

  • /etc/mtab
  • /run/
  • /var/run/
  • /var/cache/pacman/pkg/ (on Arch Linux systems)
share|improve this answer

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