1

I would like to encrypt my hard drive, but I have a lot of packages installed and configured already, so I was wandering whether it is possible to save a backup state and then restore it to the system.

My current take is this:

  1. tar everything on my system with a command such as in here:
sudo tar czf /backup.tar.gz \
--exclude=/backup.tar.gz \
--exclude=/dev \
--exclude=/mnt \
--exclude=/proc \
--exclude=/sys \
--exclude=/tmp \
--exclude=/lost+found /
  1. Then load from USB-drive, format and install new system, while encrypting my partitions.
  2. Then untar everything back to the new system.

My questions are: will that work? are there any more convenient ways to encrypt a hard drive while preserving packages and configuration? Are there some caveats I should know about? Can you share your experience?

Thanks in advance.

  • You can image and restore it later, that has been done since the dawn of computers with hard drives. Installing from scratch and then try to retrofit a full drive image from a previous installation makes no sense. Settings are all inside /home so it makes sense to back it up by any reliable mean. Manually installed packages can and should be reinstalled. It's easy to output a list of user installed packages (and additional repositories if needed) to a file and then, in the freshly installed system, use one or just a few command to reinstall everything (settings then can be retrieved from /home – ChanganAuto Sep 07 '21 at 14:09

0 Answers0