I'm looking for a list which paths/files are safe to exclude for a full system/home backup.
Considering that I have a list of installed packages.
/home/*/.thumbnails
/home/*/.cache
/home/*/.mozilla/firefox/*.default/Cache
/home/*/.mozilla/firefox/*.default/OfflineCache
/home/*/.local/share/Trash
/home/*/.gvfs/
/tmp/
/var/tmp/
- not real folders but can cause severe problems when 'restoring'
/dev
/proc
/sys
What about...
/var/
in general?/var/backups/
- can get quite large/var/log/
- does not require much space and can help for later comparison/lost+found/
When I
rsync
my system to a backup partition, I exclude these:This way I am able to boot into the backup partition the same way I can boot to the original one.
So to sum up, I would suggest
not excluding
/{dev,proc,media,...}
themselves, just their contentsexcluding
/var/{run,lock}
, and especially the big/var/cache/apt/archives/
I'll recomend to exclude all
/usr
(except fort/usr/local/
) and have a backup ofdpkg --get-selections
In my opinion a Full backup isn't really usefull. I rather prefer backup data and preferences and then restore packages from the official repositories.
But is my preference...
/usr
contains mainly static binary content from distribution packages. Reinstalling a package will restore/usr
contents. Also/bin
and/sbin
contains binaries from distribution packages./usr/local
contains manually installed packages (out of distribuition packages). so this is worth to backup.I also read all of the answers and all the other related questions when I was configuring my full system backup.
My 2 cents would be not to exclude anything but only when you are doing a full system backup of an offline system.
Let me elaborate now: If you backing up the system from within itself, then you may exclude some directories as others have mentioned but this is not a good way in my opinion as it can introduce some bugs later on when restoring the system. For example, if you exclude /tmp directory, then after restoring it, /tmp won't be there and system will create one and this can have stuck login screens due to chmod & chown issues on /tmp. Also not backing up ~/.cache directory can result in breaking up database cache of Ubuntu Software Centre.
What I do is use a live CD and use LuckyBackup and backup the entire system without omitting anything. Now when restoring, I chose 'delete files not present in the source'. This way you will have an entire system snapshot restored exactly to the state when you created the backup (kinda like snapshotting a VM).