Upgrading to Ubuntu 20, *how* to back up?

David Fletcher dave at thefletchers.net
Mon Apr 27 08:44:36 UTC 2020


On Sun, 2020-04-26 at 23:36 +0100, Peter Flynn wrote:
> ckages installed from repos don't matter because you will need to 
> reinstall them in the new versions that match the new OS version.
> 
> > 
> > Sudo edited control files:
> [...]
> > 
> > There are probably more than these (which I got from history)...
> Those definitely do matter, but if the changes are just config files
> in 
> /etc, I'd just copy the modified versions to a separate USB stick
> and 
> re-do the edits after installation upgrade. You need to do them by
> hand 
> because sometimes the file format or the syntax of config files
> changes, 
> so you can't just copy them back and hope for the best.

Thank you Peter, I couldn't have said it any better. This is exactly
what I have always done, here is the very short script that I have used
on my desktop computers ever since I started using Linux of various
flavours....

#! /bin/bash

# Local etc directory
rsync -av --delete /etc/ /home/dave/backups/copyoflocalslashetc/

aptitude search '~i !~M' | tr -s ' ' | cut -f 2 -d ' ' >
/home/dave/backups/AppsInstalledList.txt

tar cvpPzf /root/home`date +%Y%m%d%H%M`.tar.gz --exclude-
from=/home/BackupThisPCExcludes /home/*

Most of my irreplaceable files are now stored on a separate server so I
also have a script on the same desktop computer that runs with cron
every hour to rsync vital things like the /etc/ and /home/ directories
on the server, to the backups directory in the script above, so that
everything important is captured into the final tar file.

Dave




More information about the ubuntu-users mailing list