-
-
Notifications
You must be signed in to change notification settings - Fork 53
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Each diff backup should save all changes that have occurred since the last full backup.
Full → Inc₁ → Inc₂ → Diff (all changes after Full) → Inc₃ → Diff (again all changes after Full)
libvirtnbdbackup/virt/checkpoints.py
if args.level == "diff":
parentCheckpoint = checkpoints[0] #for take ONLY full backup
# ...
virtnbdrestore
dataFiles: List[str] = []
if args.sequence is not None:
logging.info("Using manual specified sequence of files.")
logging.info("Disabling redefine and config adjust options.")
args.define = False
args.adjust_config = False
dataFiles = args.sequence.split(",")
if "full" not in dataFiles[0] and "copy" not in dataFiles[0]:
logging.error("Sequence must start with full or copy backup.")
sys.exit(1)
else:
dataFiles = lib.getLatest(args.input, "*.data")
dataFiles = [f for f in dataFiles if '.diff.' not in os.path.basename(f)] #SKIP take diff for restoring by util
if not dataFiles:
logging.error("No data files (excluding diff backups) found in directory: [%s]", args.input)
sys.exit(1)
Example workflow
- Monday:
Full(original copy). - Tuesday:
Inc₁(changes afterFull). - Wednesday:
Inc₂(changes afterInc₁). - Thursday:
Diff₁(all changes fromFull, includingInc₁+Inc₂). - Friday:
Inc₃(changes afterDiff₁). - Saturday:
Diff₂(all changes from Full, includingInc₁+Inc₂+Inc₃).
Restore to Saturday:
-
Full(Monday) +Diff₂(Saturday). -
Inc₁,Inc₂,Inc₃are not required - their changes are already inDiff₂.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request