I finally have my framework just how I want it to be as a starting point. I am would like to back it up, or create a system image of it’s current working state. That way, if something goes wrong, at least I can start fresh from here. I am currently only using around 6gb. I tried clonezilla, but it wanted 1tb of space, to match the drive as a whole.
What would be the best route to do this? Thank you!
For windows, you can use macrium reflect, For linux there are some brtfs tools available.
2 Likes
I personally use LVM snapshots + dd
/dcfldd
. It’s saved my bacon quite a few times when I completely hosed my root fs.
1 Like
Sorry, I forgot to say that I am using fedora 35’s kde spin as my os.
Yeah, so then either BTRFS-type stuff or regular old LVM snapshots will work.
For LVM snapshots:
Leave some free space in your volume group and then run sudo lvcreate -L"${LVSIZE}" -s -n "${SNAPNAME}" "${SNAPSOURCE}"
, where "${LVSIZE}"
is the size of the snapshot volume (which should be equal to or smaller than the amount of free space in the volume group), "${SNAPNAME}"
is the name of the snapshot volume (I tend to use “RootSnapshot” because I take snapshots of only my root partition), and "${SNAPSOURCE}"
is the path to the source logical volume (in my case, this ends up being /dev/Crypto/Root
since I create LVM inside an encrypted container). Then, you can do something like sudo dcfldd if=/dev/${SNAPGRP}/${SNAPNAME} of=/path/to/backup/snapshot/image bs=4M
, where ${SNAPGRP}
is the volume group of the snapshot volume (so Crypto
above) and ${SNAPNAME}
is as above, to save an image of a logical volume to your backup volume (in my case, I mount my external hard drive to /media/sdb1
or such, so /path/to/backup/snapshot/image
would be /media/sdb1/snapshot.img
).
I know it looks complicated, but it’s all of 2 commands that you can throw into your backup script and it should “Just Work”. I know that recovery works (by using dd
/dcfldd
in the opposite direction to restore the snapshot) because I’ve used this method to undo stupid things I’ve done (without having to reinstall).
2 Likes