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

Bo Berglund bo.berglund at gmail.com
Sat Apr 25 16:25:17 UTC 2020


On Sat, 25 Apr 2020 16:10:46 +0100, David Fletcher
<dave at thefletchers.net> wrote:

>On Sat, 2020-04-25 at 15:09 +0200, Bo Berglund wrote:
>> "We recommend that you backup your existing Ubuntu installation before
>> you update your computer."
>> 
>> But nowhere do they mention *HOW* to do the backup!
>> 
>> It drives me nuts
>
>rsync and tar may be your best friends. You should get to know them.
>
>This time I'm also upgrading my 32 bit server motherboard still running
>14.04, to a 64 bit board. It's an industrial board with a soldered down
>processor and 12V only power so it's sitting on top of my lab power
>supply with a new hdd on the bench next to it, running rsync to copy my
>files to the new drive. My audio, video and photo files took nearly 24
>hours to copy!
>
>Next are the home directories, then I can install and configure my mail
>server stuff, reinstate the user accounts, chown the home directories
>and I'll be just about ready to swap in the new hardware and do a little
>rewiring.
>
>I learned from painful experience some years ago to never ever trash a
>working system. Hard drives are like "dynamite, gunpowder and gasoline",
>they're cheap! Buy a new one and install 20.04 to that. You can probably
>then stick the old one into a USB dock and use rsync to copy all your
>files over. Once you've overwritten what you're running now there's no
>going back and there's bound to an oh, CRAP moment when you realise that
>a config file, script or something is gone forever, so don't do it. It's
>also an opportunity to give your computer a little service by blowing
>the dust out of the fans and heatsinks etc. while you have it opened up.
>

>Now, you should probably tell us how many gigabytes you need to back up
>then somebody will likely suggest what sort of media you should be
>using.
>
>My opinions, your computer.

Thanks for your advice!
My computer is a repurposed HP notebook with a 200+ GB SSD.
It sits tucked away in a corner running 24/7 and accessed through
PuTTY and VNC.

Here are the disk usage and partition reports (I have removed
obviously non-needed information regarding "loopX" stuff)):

$ df -hlT
Filesystem     Type      Size  Used Avail Use% Mounted on
udev           devtmpfs  3,9G     0  3,9G   0% /dev
tmpfs          tmpfs     789M  1,7M  788M   1% /run
/dev/sda1      ext4      201G   16G  175G   9% /
tmpfs          tmpfs     3,9G     0  3,9G   0% /dev/shm
tmpfs          tmpfs     5,0M  4,0K  5,0M   1% /run/lock
tmpfs          tmpfs     3,9G     0  3,9G   0% /sys/fs/cgroup
tmpfs          tmpfs     789M  4,0K  789M   1% /run/user/124
tmpfs          tmpfs     789M     0  789M   0% /run/user/1000

$ sudo fdisk -l /dev/sda
Disk /dev/sda: 238,5 GiB, 256060514304 bytes, 500118192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x633bb09f

Device     Boot     Start       End   Sectors   Size Id Type
/dev/sda1            2048 428437503 428435456 204,3G 83 Linux
/dev/sda2       428437504 454651903  26214400  12,5G 82 Linux swap /
Solaris

As you can see it is barely used...
But I have installed the Mate desktop and also a lot of dev tools.
Don'ät want to lose these, so will that be kept/upgraded too during an
Ubuntu upgrade?

Maybe I should shrink the /dev/sda1 partition by say half and create
another in that space like /dev/sda3 to be used as a copy of the main
installation using rsync or similar?
Then I could upgrade to the 20.4 LTS version on sda1 and if it works
out OK I could just forget the backup.
But if I need it, how do I start using that image instead of the
converted one (that has failed)?

Or should I put a (non-SSD) drive in a USB converter and attach to the
USB3 connector and then use that as the target for my backup?



-- 
Bo Berglund
Developer in Sweden





More information about the ubuntu-users mailing list