Repository navigation
add --auto-full-ratio option for size based backup chains - #36
Conversation
28a8a26 to
c8d0e96
Compare
An incremental backup chain only grows, and a virtual machine which rewrites its disk saves the same blocks over and over, so the chain eventually occupies more space than the disk image itself. With backup level auto, --auto-full-ratio starts a new chain with a full backup as soon as the existing chain of any included device outgrows the given multiple of the space a full backup of that device requires. The chain is measured against what a full backup costs rather than against the disk image size alone: a full backup of a small or sparsely allocated disk is bigger than the space the image occupies, so the image size alone would start a new chain costing more than the one it replaces.
c8d0e96 to
331e9c4
Compare
|
One thing worth flagging: the With I could not turn it into a reliable |
--auto-full-ratio keeps the chain it replaces, so the target has to hold that chain and the new full backup at the same time. A target sized after the disk image is the least likely to have room for both, exactly because the chain outgrew the image. Removing the chain before the full backup is written costs the only restorable backup in the target should that backup fail, so it stays opt-in.
|
I've added a feature to this PR which comes from our usage of qmpbackup -- the predelete. Generally this code passed also our CI, but I haven't tested it in real setup yet. It's up to you @abbbi if you want me to reassure deeper the functionality, or you are ok with merging this in current state. As usually bugs might come in the future. |
I made tests in real setup and it correctly kicked in: |
|
@abbbi I wonder when you plan to release new version with the added feature? |
An incremental backup chain only grows, and a virtual machine which rewrites its
disk saves the same blocks over and over, so the chain eventually occupies more
space than the disk image itself.
With backup level auto,
--auto-full-ratiostarts a new chain with a full backupas soon as the existing chain of any included device outgrows the given multiple
of the space a full backup of that device requires.
The chain is measured against what a full backup costs rather than against the
disk image size alone: a full backup of a small or sparsely allocated disk is
bigger than the space the image occupies, so the image size alone would start a
new chain costing more than the one it replaces.
--auto-full-remove-chain, off by default, removes the chain before the fullbackup replacing it is written. A target sized after the disk image is the least
likely to have room for both, exactly because the chain outgrew the image. Should
that full backup then fail, the target is left without a restorable backup, so
the option stays opt-in.
Fixes #35