Coder Social home page Coder Social logo

No way to exclude disks about virtnbdbackup HOT 11 CLOSED

abbbi avatar abbbi commented on May 23, 2024
No way to exclude disks

from virtnbdbackup.

Comments (11)

abbbi avatar abbbi commented on May 23, 2024

its some time since ive used it as i currently have no test setup. The include swich should work as expeced, does "vda" match the virtual disks target name in the xml configuration? According to the source, im checking for the target name:

      for disk in disks:                                                                                                                                                     
      ┆   if args.include != None and disk.diskTarget != args.include:                                              
      ┆   ┆   logging.info("Skipping disk: %s" % disk.diskTarget)                              
      ┆   ┆   continue  

one would need the vm XML configuration to check why it doesnt skip the disks.

from virtnbdbackup.

rickyketch avatar rickyketch commented on May 23, 2024

abbbi, I believe "vda" does match

<devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source file='/home/virt/DRBL-C7.qcow2'/>
      <target dev='vda' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
    </disk>
    <disk type='file' device='disk' snapshot='no'>
      <driver name='qemu' type='raw'/>
      <source file='/var/lib/libvirt/images/2TBpart/IMGSTOR-B.img'/>
      <target dev='vdb' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x0a' slot='0x00' function='0x0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <target dev='sda' bus='sata'/>
      <readonly/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>

DRBL-C7.xml.TXT

from virtnbdbackup.

abbbi avatar abbbi commented on May 23, 2024

can you post complete output of your command? Does the "Skipping disk:" logline appear at all?
disk.diskTarget should be "vda" in you case and it should match.

from virtnbdbackup.

rickyketch avatar rickyketch commented on May 23, 2024

[root@oplx7010 virt]# virtnbdbackup -d DRBL-C7 -l full -o backup -i vda ERROR:root:Domain is missing required incremental-backup capability.

the domain configuration iss missing the required incremental flag like described in the README:

https://github.com/abbbi/virtnbdbackup#prerequisites

from virtnbdbackup.

abbbi avatar abbbi commented on May 23, 2024

Can you try the version in branch issue2,it should now automatically exclude cdrom and raw devices.
efc0cc3

from virtnbdbackup.

abbbi avatar abbbi commented on May 23, 2024

[root@oplx7010 virt]# virtnbdbackup -d DRBL-C7 -l full -o backup -i vda ERROR:root:Domain is missing required incremental-backup capability.

the domain configuration iss missing the required incremental flag like described in the README:

https://github.com/abbbi/virtnbdbackup#prerequisites

from virtnbdbackup.

rickyketch avatar rickyketch commented on May 23, 2024

Ok, I just created a new, plain vanilla, centos7.0 VM to try to replicate the problem and I still got that last error message.

[root@oplx7010 virt]# virtnbdbackup -d centos7.0 -l full -o backup -i vda ERROR:root:Domain is missing required incremental-backup capability.

Then I remembered, I forgot to add "<qemu:add capability='incremental-backup'/>" like I did before.
Well, now I can't:

[root@oplx7010 virt]# virsh edit centos7.0 error: XML document failed to validate against schema: Unable to validate doc against /usr/share/libvirt/schemas/domain.rng Element domain has extra content: qemu:capabilities

and I'm trying to figure out why I could before and now I can't. Something new I've noticed with Fedora 33 is that it automatically installs updates every time I reboot. And I see that schema file got updated just a few days ago:

[root@oplx7010 qemu]# rpm -q --last libvirt-libs-6.6.0-5.fc33.x86_64 libvirt-libs-6.6.0-5.fc33.x86_64 Thu 18 Mar 2021 04:38:08 PM PDT

from virtnbdbackup.

abbbi avatar abbbi commented on May 23, 2024

[root@oplx7010 virt]# virtnbdbackup -d centos7.0 -l full -o backup -i vda ERROR:root:Domain is missing required incremental-backup capability.

Then I remembered, I forgot to add "<qemu:add capability='incremental-backup'/>" like I did before.
Well, now I can't:
[root@oplx7010 qemu]# rpm -q --last libvirt-libs-6.6.0-5.fc33.x86_64 libvirt-libs-6.6.0-5.fc33.x86_64 Thu 18 Mar 2021 04:38:08 PM PDT

hm.. not sure, but maybe things have changed now with more recent libvirt versions, it seems to be enabled by
default now:

https://bugzilla.redhat.com/show_bug.cgi?id=1799015

from virtnbdbackup.

abbbi avatar abbbi commented on May 23, 2024

hi,

i tried on centos8 with the latest advanced virtualization stream and i still need to add the XML definition,
system comes with libvirt 6.6.0 aswell. (6.6.0-13). you need to be sure that the FIRST line of the virtual machine is:

<domain type='kvm' id='4' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>

so the schema applies!

from virtnbdbackup.

abbbi avatar abbbi commented on May 23, 2024

hi again,

i have a new test setup and was able to fix a few things in the current master branch:

  1. cdrom and unsupported devices are now ignored during checkpoint creation,
    in case virtual disk does not support checkpointing, an warning is issued, see issue #3

  2. the include option works just right for me, using the following command:

./virtnbdbackup -d debian10 -l full -i vdb -o blax

i see only vdb is backed up:

INFO:root:Skipping disk: vda

Anyway, try the latest master version, it should fix your issues.

from virtnbdbackup.

rickyketch avatar rickyketch commented on May 23, 2024

Yes indeed. All is working now. Thank you!

from virtnbdbackup.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.