How to backup before a release upgrade from Ubuntu 18.04.5 LTS server?
Bo Berglund
bo.berglund at gmail.com
Sun Sep 26 13:09:48 UTC 2021
On Sun, 26 Sep 2021 13:57:36 +0200, Liam Proven <lproven at gmail.com> wrote:
>OK, look, let me try to cut through the complexity.
>
>2 things.
>
> 18.04 just got given several more years of support. If it's still
>doing what you need, it might be OK.
>
>(To be honest, I wish I hadn't updated my main laptop from 16.04,
>which was still 100% fine.)
I did not know this, good to know since I really do not want to mess with a
working system, but if it is getting off LTS I figured I have to.
My server is Ubuntu 18.04 LTS. It has no GUI, just a server computer so I have
to use SSH to work with it from the command line, I use PuTTY from Windows 10.
It is used as:
- OpenVPN server for access to my home LAN while away from home
- Subversion backup server for my company (svnsync)
- Webserver for video streaming when I am not at home (videos need *not* be
backed up)
> This is the easiest way to back up a whole computer:
>
>You need an external backup drive at *least* big enough to hold the
>entire disk of the machine to be backed up. This is true anyway,
>whatever you use. Ideally it should be entirely empty or contain
>nothing you wish to keep.
I have attached a 500 GB ext4 formatted drive on which I ran sudo rm -rf *
So it is now empty. It is present as sdb1.
I can mount it using this command:
sudo mount /dev/sdb1 /mnt/backup
But then I add this into /etc/fstab to automate mounting:
#USB connected backup drive:
UUID=7ec31e87-6e2d-403b-a26e-84d57c248364 /mnt/backup ext4
and when I do this:
sudo mount -a
there is a longish wait and then this is displayed:
"Unable to find suitable address."
What am I doing wrong?
I do want the USB disk to be mounted whenever it is present.
I got the UUID using this command:
sudo lsblk -o UUID,NAME,FSTYPE,SIZE,MOUNTPOINT,PARTUUID
...
sdb 465.8G
7ec31e87-6e2d-403b-a26e-84d57c248364 +-sdb1 ext4 465.8G /mnt/backup
9a7e2c89-01
Of course I can do a manual mount every time but why does it not work via fstab?
>You also need a bootable USB key with the latest Ubuntu Desktop you're
>happy with. Same as the machine to be backed up is good. So,
>18.04-$LATEST.
>
>[1] Shut down the server. Attach the bootable USB key & the external drive.
How to mount the external drive (see above)?
>[2] Boot off the key.
>
>[3] Pick "try" to get to the desktop.
This seems to require hardware access to the Linux server?
Like having a rean monitor and keyboard attached to it...
My server is headless and the only access possibility is vis SSH (PuTTY in my
case). No monitor available at all.
>[4] Run the GParted app included on every bootable USB key.
Requires GUI access AFAIU... Cannot get further
>Make sure you can see and tell the difference between internal and
>external disks.
>
>E.g. /dev/sda = internal, /dev/sdb = bootable USB, /dev/sdc = external
>
>WRITE THIS DOWN. IT IS *EXTREMELY* IMPORTANT.
>
>[5] Switch to the external drive in the drop-down selector at top right.
>
>[6] Remove all partitions on the EXTERNAL drive. Select each one,
>right-click and pick Delete. Then click Apply in the toolbar.
>
>[7] Now switch to the INTERNAL drive.
>
>Select each partition in turn. Right-click and pick Copy.
>
>Switch to the external drive. Pick some empty space. Click Paste.
>
>Do this for all partitions. (You can omit and recreate swap if you
>like; there is nothing in there to keep.)
>
>[8] Click Apply.
>
>Go have lunch. This could take an hour or 2.
>
>When it's done, you have backed up your server.
>
>If you have problems with the update, repeat the process in reverse,
>and follow any one of dozens of tutorial online about "how to
>reinstall grub".
--
Bo Berglund
Developer in Sweden
More information about the ubuntu-users
mailing list