[GTALUG] What Not To Backup

Giles Orr gilesorr at gmail.com
Fri Dec 23 12:53:06 EST 2016


On 23 December 2016 at 12:11, John Moniz via talk <talk at gtalug.org> wrote:
> I'm backing up my system on a more regular basis and am trying to fine tune
> the files that I backup. I am looking for advice on what NOT to bother to
> backup on the /home directory.
>
> I am using rsync (took a long time and lots of trials to figure out the man
> page - and still don't know 90% of it) and presently have the following on
> my exclude_list.txt:
> (Note: multiple items shown on one line are just for readability, each line
> in the file only has one item)
>
> tmp* TMP*
> .cache* cache* Cache* CACHE* *CACHE *Cache *cache
> .cookies* cookies*
> Trash Trash* TRASH*
> Junk* junk*
> .gvfs
> Backups backups
> Crash*
> .xsession-errors*
> .macromedia
> .thumbnails
> .mozilla/firefox/*/thumbnails
> *.corrupt
> minidumps
> .local/share/gvfs*
>
> I'd love to exclude things that perhaps one would never use from a backup to
> rebuild a system after an accidental clean wipe of all data.
>
> Similarly, any recommendations of what I should back up outside of /home? I
> am thinking of things like /etc/fstab, files that would make it easier to
> recover from a crash or to upgrade a distro.
>
> Thanks for any advice.

If you only have very limited space for backups, that looks like a
pretty good list (very similar to one I had a few years back).  If you
can afford it, I'd recommend just backing up your entire /home/ (and
rsync is a great way to do it).  It's easier because A) you don't have
to maintain that list of exceptions, and B) you don't find out AFTER
your HD crashes that you really did need that .cookies folder to get
back into your bank's account page.  That latter is just a random
example: if you don't back it all up, you'll find out that you needed
something that's no longer there.

Several further recommendations:
- if you have a directory full of Linux ISOs (as I suspect many of us
do), that's a good directory to not back up ... unless you
custom-build them
- back up /etc/ in its entirety
- back up /var/ if you have the space - /var/ is usually small,
although Apt, Docker, and possibly your web server are given to
seriously fattening it up
- the options I use for local copies with rsync are: "--verbose
--recursive --update --times --progress --stats --delete --perms
--hard-links --links" (not necessarily right for you, but may help)
- use the long-form options in scripts: it's a LOT easier to read and
remember what you were trying to achieve
- keep at least three rotating backups, preferably one off-site
- keep your backups on encrypted media if you can

-- 
Giles
http://www.gilesorr.com/
gilesorr at gmail.com


More information about the talk mailing list