I'm currently using Ubuntu and realized I didn't set up full disk encryption when I installed it. Since it's not possible to enable encryption after the fact, I'm planning to reinstall Ubuntu. However, I want to ensure I save everything about my current setup—my files, settings, and installed programs—so I can easily restore everything after the fresh install with encryption. What's the simplest and most foolproof method to create a complete backup?
5 Answers
If you’re into using cloud services, check out rclone. It’s a fantastic tool for backups, especially if you want to back up to Google Drive or similar services.
If you want to back up everything, you can copy the whole root directory (/) but leave out directories like /media, /mnt, /dev, /sys, and /proc. You can use a command like `rsync -aPHAXvxh --no-inc-recursive --info=stats,misc,progress2 / /media/External/Backup`. This command handles filesystem boundaries without crossing them and is pretty reliable. If you're okay skipping some advanced features, you can simplify it to `rsync -avxh / /media/External/Backup`.
You can actually encrypt an already installed system, but it’s complex and risky. It might be easier and safer just to back up your files, then do the reinstall with encryption. For backups, I generally just focus on my home directory and keep notes or scripts for reinstalling my programs.
One straightforward approach is to simply remove your existing drive and replace it with a new SSD or HDD for the installation. That way, you won't need to bother with backups since you'll still have the original drive intact.
I’d recommend using rsync to back up your home directory to external storage and then bring it back after the reinstall. It’s also a good idea to export your installed packages, but be cautious if you’re using snap packages, as exporting those can be tricky.

Related Questions
How To Get Your Domain Unblocked From Facebook
How To Find A String In a Directory of Files Using Linux