halfgaar wrote:I looked at snapshots, but saw a few comments that
snapshots were not a suitable long term backup mechanism.
Probably when they say it's not a long term solution, they mean live copy-on-write snapshots, and retaining them. That's true, because all write operations then have to be duplicated.
My system is basically what you have, but then without downtime, and more efficient because it doesn't store unused blocks from the file system. I use Xen and my disks are on LVM (logical volume management). With LVM, you can make in instant copy-on-write frozen snapshot of any volume. So, my scripts, in essence:
* Make a snapshot
* Take the first 100 MB and dd it: that will contain partition table and boot loaders.
* use losetup to scan for partitions on it.
* Do a filesystem repair, because it 'looks' like a uncleanly shutdown file system
* Use partclone on a designated partition in the snapshot, to only copy the used blocks to a gzip file
* Delete the snapshot
Your system looks pretty slick, although what's the restore operation look like? At the end of it... do you have
to piece together the GZIP files which contain sets of used blocks?
I normally use LVM, but for some reason this particular server does not have LVM. Not sure why.
Your comment about the snapshots looking unclean is something I ran across. I initially paused
the VM before copying, and of course that always needed a repair before restore. I was worried about
whether those repairs were guaranteed to succeed, so I elected to switch to shutdown where I had a
guaranteed clean FS. Sadly - I now get occasional restart issues

Thanks for the insights.
Paul.