Ubuntu – What are directories I should avoid when making a backup

backup

There was this other question asking what directories can be excluded, based on their necessity.

However, I think what I am asking is different enough to merit a separate question.

I use the Spideroak backup service, and they have some kind of system that keeps historical copies of saved files.

My intention was to simply backup my whole home directory, which is somewhere around 70GB in size.

However, it seems some directories contain cache files or other things that are updated or replaced frequently. Because Spideroak is saving every copy with every change, the space I am using on my Spideroak account is rapidly increasing and in danger of maxing out.

One solution is to white list only the directories I am sure I want to keep. However some directories are not so clear. My .mozilla directory, which contains my Firefox settings… I want to back up my bookmarks, but not things like the cache, and with all the sub-directories it's hard to know where to draw the line.

So, which directories should I definitely avoid, as they are just frequently updated cache and system files which will unnecessarily bloat my backup?

Best Answer

You'll definitely want to exclude the following:

  • /proc
  • /lost+found
  • /sys
  • /mnt
  • /media
  • /dev

and everything they contain