On Mar 2, 2017, at 6:36 PM, Robert Moskowitz rgm@htt-consult.com wrote:
I want to image the drive at various 'checkpoints' so I can go back and redo from a particular point… what dd params work?
dd if=/dev/sdb of=os.img bs=1M count=3210
That looks plausible. (I haven’t verified your count parameter exactly.)
However, I wonder why you’re trying to reinvent snapshots, a technology now built into several advanced filesystems, such as btrfs and ZFS?
https://en.wikipedia.org/wiki/Btrfs#Subvolumes_and_snapshots
btrfs is built into CentOS 7. While there have been some highly-publicized bugs in btrfs, they only affect the RAID-5/6 features. You don’t need that here, so you should be fine with btrfs.
And if you really distrust btrfs, ZFS is easy enough to integrate into CentOS on-site.
And if *that* is also out of the question, you have LVM2 snapshots:
http://tldp.org/HOWTO/LVM-HOWTO/snapshots_backup.html
Why reinvent the wheel?