Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If user adds new disk, then virtnbdbackup could create new full backup for this disk. #135

Open
alonezw opened this issue Sep 12, 2023 · 2 comments
Labels
enhancement New feature or request wontfix This will not be worked on

Comments

@alonezw
Copy link

alonezw commented Sep 12, 2023

Version used
1.9.42

Describe the bug
If virtnbdbackup works in incremental mode with some number of disks, and user adds another one, then backup brokes with error.

Expected behavior
If user adds new disk, then virtnbdbackup must create new full backup for this disk.

Hypervisor information:

  • OS: Rocky Linux 9.2
  • HV type: libvirt

Logfiles:
[2023-09-12 16:14:33] INFO lib common - printVersion [MainThread]: Version: 1.9.42 Arguments: /bin/virtnbdbackup --domain backup-test --level inc --compress --output /kvm/backups/0c06fc90-c706-4342-825b-29647658b840_backup-test_1
[2023-09-12 16:14:33] INFO root virtnbdbackup - main [MainThread]: Backup level: [inc]
[2023-09-12 16:14:33] INFO root virtnbdbackup - main [MainThread]: Compression enabled, level [2]
[2023-09-12 16:14:33] INFO root virtnbdbackup - main [MainThread]: Libvirt library version: [9000000]
[2023-09-12 16:14:33] INFO root virtnbdbackup - main [MainThread]: Backup will save [3] attached disks.
[2023-09-12 16:14:33] INFO root virtnbdbackup - main [MainThread]: Concurrent backup processes: [3]
[2023-09-12 16:14:33] INFO root checkpoint - redefine [MainThread]: Loading checkpoint list from: [/kvm/backups/0c06fc90-c706-4342-825b-29647658b840_backup-test_1/checkpoints]
[2023-09-12 16:14:33] INFO root checkpoint - create [MainThread]: Checkpoint handling.
[2023-09-12 16:14:33] INFO root checkpoint - create [MainThread]: Next checkpoint id: [3].
[2023-09-12 16:14:33] INFO root checkpoint - create [MainThread]: Parent checkpoint name [virtnbdbackup.2].
[2023-09-12 16:14:33] INFO root checkpoint - create [MainThread]: Using checkpoint name: [virtnbdbackup.3].
[2023-09-12 16:14:33] INFO root virtnbdbackup - main [MainThread]: Local NBD Endpoint socket: [/var/tmp/virtnbdbackup.2164493]
[2023-09-12 16:14:33] INFO root virtnbdbackup - main [MainThread]: Temporary scratch file target directory: [/var/tmp]
[2023-09-12 16:14:33] INFO root virtnbdbackup - startBackupJob [MainThread]: Starting backup job.
[2023-09-12 16:14:33] INFO fs fs - freeze [MainThread]: Freezed [1] filesystems.
[2023-09-12 16:14:33] INFO fs fs - thaw [MainThread]: Thawed [1] filesystems.
[2023-09-12 16:14:33] ERROR root virtnbdbackup - startBackupJob [MainThread]: Failed to start backup: [checkpoint inconsistent: missing or broken bitmap 'virtnbdbackup.2' for disk 'vdc']

Workaround:
no

@alonezw alonezw added the bug Something isn't working label Sep 12, 2023
@abbbi abbbi added enhancement New feature or request and removed bug Something isn't working labels Sep 12, 2023
@abbbi
Copy link
Owner

abbbi commented Sep 12, 2023

Its correctly failing because the checkpoint information about the disks is inconsistent ( the freshly added disk does not have an bitmap tied to the (prior) checkpoint)

Thats okey. There is currently no logic that attempts to check wether if an virtual machine amount of disks was altered between full and incremental backup. That would be an enhancement, as it stands. Currently the user at least notices theres something wrong.

Also, falling back to a full backup would mean backup needs to go to a new directory, as the current backup folder used already includes an full backup (complete new backup chain must be started to a fresh, empty directory), and following incremental backups must be changed to this target directory then too. Its not an easy fix and there all kinds of scenarios i could imagine this will result in confusing situations.

I dont think ill implement this, ill leave it to the users sane behavior to know a full backup should be done next if
hes altering the virtual machine configuration in such ways, or script around this using pre/post scripting.

Also i dont know if the restore utility could handle this correctly without changes and the feature would become even more interesting in transient virtual machine (clustered) environments where re-defining the checkpoints is mandatory to continue backup chains.

@abbbi abbbi changed the title Trouble with adding a new disk to existing backup If user adds new disk, then virtnbdbackup must create new full backup for this disk. Sep 12, 2023
@abbbi abbbi changed the title If user adds new disk, then virtnbdbackup must create new full backup for this disk. If user adds new disk, then virtnbdbackup could create new full backup for this disk. Sep 12, 2023
@alonezw
Copy link
Author

alonezw commented Sep 12, 2023

Ok, i undestand. Thanks. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants