Remote Backup Problem
aminhashemi1994 opened this issue · 2 comments
hi, i have installed this script and its working great for creating backup locally.
i want to use remote backup feature, but i have faced with a problem that i cannot find out why it is happening.
let me explain my sitation here:
i have 2 physical server with full port access to each other.
i have set their hostsnames in /etc/hosts
and added root ssh_key of them both to each other.
i use this command on the destination server that i want to create my backup there and the source server is the server that i have my vm in there. i get this error :
this is the remote backup command :
virtnbdbackup -U qemu+ssh://root@hv9.partdp.ir/system --ssh-user root -d 20240416-161527643789309-11_cando-neobank-1-test-base.part.psg.network -o /opt/kvm_pool/backup/
and i get this error :
root@hv4:~# virtnbdbackup -U qemu+ssh://root@hv9/system --ssh-user root -d 20240416-161527643789309-11_cando-neobank-1-test-base.part.psg.network -o /opt/kvm_pool/backup/
[2024-04-21 10:39:21] INFO lib common - printVersion [main]: Version: 2.8 Arguments: /usr/local/bin/virtnbdbackup -U qemu+ssh://root@hv9/system --ssh-user root -d 20240416-161527643789309-11_cando-neobank-1-test-base.part.psg.network -o /opt/kvm_pool/backup/
[2024-04-21 10:39:21] INFO root virtnbdbackup - main [main]: Backup level: [copy]
[2024-04-21 10:39:21] INFO virt client - _connect [main]: Connected to remote host: [hv9.partdp.ir]
[2024-04-21 10:39:21] INFO root virtnbdbackup - main [main]: Libvirt library version: [7000000]
[2024-04-21 10:39:21] INFO root virtnbdbackup - main [main]: NBD library version: [1.6.1]
[2024-04-21 10:39:21] INFO root disktype - Optical [main]: Skipping attached [cdrom] device: [sda].
[2024-04-21 10:39:21] INFO root virtnbdbackup - main [main]: Backup will save [2] attached disks.
[2024-04-21 10:39:21] INFO root virtnbdbackup - main [main]: Concurrent backup processes: [2]
[2024-04-21 10:39:21] INFO root checkpoint - create [main]: Loading checkpoints from: [/opt/kvm_pool/backup//20240416-161527643789309-11_cando-neobank-1-test-base.part.psg.network.cpt]
[2024-04-21 10:39:21] INFO root checkpoint - redefine [main]: Loading checkpoint list from: [/opt/kvm_pool/backup//checkpoints]
[2024-04-21 10:39:21] INFO root checkpoint - create [main]: Checkpoint handling.
[2024-04-21 10:39:21] INFO ssh client - connect [main]: Connecting remote system [hv9.partdp.ir] via ssh, username: [root]
[2024-04-21 10:39:22] INFO paramiko.transport transport - _log [Thread-1]: Connected (version 2.0, client OpenSSH_8.4p1)
[2024-04-21 10:39:22] INFO paramiko.transport transport - _log [Thread-1]: Authentication (publickey) successful!
[2024-04-21 10:39:22] INFO root virtnbdbackup - main [main]: Remote NBD Endpoint host: [hv9.partdp.ir]
[2024-04-21 10:39:22] INFO root virtnbdbackup - main [main]: Temporary scratch file target directory: [/var/tmp]
[2024-04-21 10:39:22] INFO root job - start [main]: Starting backup job.
[2024-04-21 10:39:22] INFO fs fs - freeze [main]: Freezed [11] filesystems.
[2024-04-21 10:39:23] INFO fs fs - thaw [main]: Thawed [11] filesystems.
[2024-04-21 10:39:23] ERROR root job - start [main]: Failed to start backup: [internal error: unable to execute QEMU command 'nbd-server-start': Failed to bind socket: Cannot assign requested address]
note : virtnbd backup is enabled in vm xml and i can easily create local full and increamental backups. i cannot only create remote backup.
Hi, please add log with verbose option, it seems either an wrong ip address Or Port is used to Start the NBd Service, could be a problem with local dns resolution on the Remote Host.
you can also try —nbd-ip Option to specify the ip the nbd Server is bound to on the remote system
hv9.partdp.ir Needs to be resolved correctly on the Remote system
thanks a lot, i used ip instead of hostname and it works now, but i test hostnames and i could ssh to my server with the hostnames. i couldnt find out the problem, but with using nbd-ip my probles solved. thanks a lot.
keepup the good work <3