News for hackers. Stuff that matters.
Re:BorgBackup, Deduplicating archiver with compression and e... by SoftTalker on Tuesday December 27, 2022 @03:59PM (#34153714)
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.

Re:BorgBackup, Deduplicating archiver with compression and e... by av8avenger on Tuesday December 27, 2022 @04:01PM (#34153734)
Take 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/

Re:BorgBackup, Deduplicating archiver with compression and e... by vbezhenar on Tuesday December 27, 2022 @04:04PM (#34153778)
Dumbest 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.

Re:BorgBackup, Deduplicating archiver with compression and e... by akerl_ on Tuesday December 27, 2022 @04:02PM (#34153749)
Do 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".

Re:BorgBackup, Deduplicating archiver with compression and e... by SoftTalker on Tuesday December 27, 2022 @04:13PM (#34153888)
For 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.

Re:BorgBackup, Deduplicating archiver with compression and e... by dividuum on Tuesday December 27, 2022 @04:28PM (#34154092)
If 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.
Re:BorgBackup, Deduplicating archiver with compression and e... by akerl_ on Tuesday December 27, 2022 @05:15PM (#34154588)
Yea; 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.
Re:BorgBackup, Deduplicating archiver with compression and e... by eointierney on Tuesday December 27, 2022 @04:02PM (#34153741)
Clonezilla 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.
Re:BorgBackup, Deduplicating archiver with compression and e... by hoffie on Tuesday December 27, 2022 @06:21PM (#34155257)
> 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/

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).

Re:BorgBackup, Deduplicating archiver with compression and e... by abbbi on Wednesday December 28, 2022 @03:38AM (#34158891)
ReaR is an awesome piece of software!