3 ms·
Maybe a bit off topic, but what is a good utility for "imaging" a linux system. I have a task to reprovision a system but we want to keep a complete backup of t
by SoftTalker 4y ago
Maybe a bit off topic, but what is a good utility for "imaging" a linux system. I have a task to reprovision a system but we want to keep a complete backup of the current system so that it's possible to restore completely as if it were never touched.
This is more than just data backup as we would need need to recover disk partitions/LVM metadata, boot records, etc. as well as all the data itself.
- av8avenger 4y agoTake a look at Clonezilla. Used it many times for the exact same purpose. You could run it either on a running system or use the live iso they provide. https://clonezilla.org/ https://clonezilla.org/
- eointierney 4y agoClonezilla is awesome, fast, stable, flexible, and reliable, from the Taiwan Supercomputing Centre. I used it lots over a decade ago to manage Mac, Windows, and Linux workstations and servers.
- akerl_ 4y agoDo you need to do this once, or 10 times, or 1000 times? How big are the disks? The most boring answer is "connect the disks to something else and use `dd` to copy the full blocks from start to finish into a file".
- SoftTalker 4y agoFor this specific need, just once. Disk is 1TB but only about 350GB used. 'dd' would have been my thought as well, I've heard of Clonezilla also but never used it and not sure it's really doing anything appreciably different. I like the idea of 'dd' because I have a very clear mental picture of what it does. Just wasn't sure there was something else I might want to look at.
- dividuum 4y agoIf you need multiple version of such a disk image, a tool like restic (or I guess borg too, not sure?) can also compress what's provided to it via stdin. So you'd dd directly into restic and it will delta compress to earlier backups.
- akerl_ 4y agoYea; this was the heart of my 1/10/1000 question. Once? I'd probably just use dd and call it a day. 10 times? Probably download clonezilla. 1000 times? Probably automate something w/ restic and some kind of object storage layer so I don't just have a directory full of giant images/deltas somewhere.
- vbezhenar 4y agoDumbest approach is dd + compress. Slightly smarter approach is dd, then zero unused sectors and compress. Both will produce an image which could me restored with DD (or mounted offline). Second will be smaller. They should be run with unmounted partitions.
- hoffie 4y ago> we would need need to recover disk partitions/LVM metadata, boot records, etc. as well as all the data itself. While other suggested, image-based solutions better fit your bit-for-bit requirement, you might also be interested in ReaR: https://relax-and-recover.org/ https://relax-and-recover.org/ ReaR generates a bootable image which performs all that basic partitioning and is able to trigger an actual system/application data file restore using a variety of tools (including borg).
- abbbi 4y agoReaR is an awesome piece of software!