From f0590df86f3726f02946d48b50d09b2428565ce7 Mon Sep 17 00:00:00 2001 From: ma Date: Tue, 30 Mar 2021 12:45:48 +0200 Subject: [PATCH] Using option -p and -l inc has also created an checkpoint but did not save any data for it. As such, a user can break its backup chain by trying to estimate the backup size. Enforce backup level copy if option -p is set, so no checkpoint is created to ensure an consistent backup chain. --- libvirtnbdbackup/__init__.py | 2 +- virtnbdbackup | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/libvirtnbdbackup/__init__.py b/libvirtnbdbackup/__init__.py index 7e21fb90..1a798eb3 100644 --- a/libvirtnbdbackup/__init__.py +++ b/libvirtnbdbackup/__init__.py @@ -1 +1 @@ -__version__= "0.11" +__version__= "0.12" diff --git a/virtnbdbackup b/virtnbdbackup index fe5eb18b..887c4cd2 100755 --- a/virtnbdbackup +++ b/virtnbdbackup @@ -118,6 +118,10 @@ def main(): logging.error("Backup format raw does not support incremental backup") sys.exit(1) + if args.printonly is True: + logging.info('Printing only extend information: enforce level copy') + args.level = "copy" + if not args.output == "-" and not args.startonly and not args.killonly: if not lib.targetIsEmpty(args): logging.error("Target directory must empty for full or copy backup.") @@ -197,7 +201,7 @@ def main(): logging.error("No prior checkpoints found, execute full backup first") sys.exit(1) - logging.info("Using checkpoint name %s", checkpointName) + logging.info("Using checkpoint name: %s", checkpointName) logging.info('Temporary scratch file target directory: %s', args.scratchdir)