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

Ralf Mardorf silver.bullet at zoho.com
Sat Apr 25 17:03:39 UTC 2020


Hi,

don't backup your install to an internal drive.

Download an Ubuntu flavour image and burn it to a DVD.

Restart the computer and boot the live DVD by clicking the icon of the
partition of your install and the one of the external drive. Fortunately
your install is on a single partition.
Open a terminal and run

$ sudo -i

then change to the mount point of the install you want to backup

# cd /media/ubuntu_flavor/mount_point_of_the_root_directory

note, the root directory is / , it is not /root .

List all files by running

# ls -hAl

It should only show files and directories that do not start with a dot.

IOW it should not contain any .file or .directory/, since due to
globbing, by using the asterisk, as shown by my example below, would not
backup files that start with a dot.

If no items beginning with a dot are shown either run

# cp -ai * /media/ubuntu_flavor/mount_point_backup_partition; echo $?

or run

# tar --xattrs -czf backup.tar.gz *; echo $?

The echo command should return the value 0, if it shouldn't, the backup is broken.

If you use the cp command you could use the diff command to ensure that
the target and backup are identical, run

# diff -r /media/ubuntu_flavor/mount_point_of_the_root_directory /media/ubuntu_flavor/mount_point_backup_partition

As long as it doesn't complain about missing sockets or doesn't complain at all, everything is good. Don't worry about sockets.

Before following my advices, wait until another subscriber of this mailing list confirms that I didn't made a typo or another mistake.

If the backup is done, disconnect the external drive, before you continue with booting and updating your install.

Regards,
Ralf




More information about the ubuntu-users mailing list