Re: What's the correct way to backup LVM fully encrypted system?
Reply #1 –
This solution is very simple and requires space ( probably using something like a separate hard drive to store the backup ), but it doesn't require you to jump through hoops to keep your backup in one piece, learn complex tools or maintain it's structure:
take an entire image of your storage device using dd(1) and compress it using gzip
Before you do any installation, fill your storage device with zeroes from begging to end ( dd if=/dev/zero of=/dev/sdx ), this will help a lot with the compression being more effective. ( filling it with zeroes will also wipe it completely, so get all your data off it )
After the installation and when everything is setup and you want to do backup, run this ( /dev/sdx is your storage device ):
dd if=/dev/sdx status=progress bs=512 | gzip - > /mnt/hdd/backup.img.gz
And of course whenever you want roll back your system to that backup, run this:
dd if=/mnt/hdd/backup.img.gz of=/dev/sdx status=progress bs=512
The path and file names mentioned here are only for illustration, you have to figure them out on your own system.