abbbi / virtnbdbackup

Backup utility for Libvirt / qemu / kvm supporting incremental and differential backups + instant recovery (agentless).
http://libvirtbackup.grinser.de/
GNU General Public License v3.0
343 stars 46 forks source link

SSH tunnelling for NBD #231

Open amorsen opened 3 weeks ago

amorsen commented 3 weeks ago

Currently you can do nbd tunnelling through ssh if you open a separate ssh connection with -L 10809:localhost:10809. All that is required is to pass the -I localhost option to virtnbdbackup.

It would be really convenient if virtnbdtunnel could do this natively with the ssh connection it establishes anyway for qemu+ssh.

abbbi commented 2 weeks ago

neat idea, but looking at python paramikos port forwarding example its quite some code to add. Not sure if its worth the hassle if a simple ssh command beforehand can easily be scripted around.

https://github.com/paramiko/paramiko/blob/main/demos/rforward.py

I also would gess performance is probably better using ssh instead of the python based implementation.