4

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

lost+found
ld.so.cache

# 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?

  • 1
    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 'SO- stop being evil' Sep 16 '12 at 22:38
1

I usually also exclude:

  • /etc/mtab
  • /run/
  • /var/run/
  • /var/cache/pacman/pkg/ (on Arch Linux systems)

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