install pve-zsync

ale.ab

Renowned Member
Mar 31, 2015
30
2
73
Bergamo, Italy
Hello,
i try to install pve-zsync into fresh proxmox 3.4 but i receive an error...

Code:
root@server:~# apt-get install pve-zsync
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package pve-zsync

how i could fix it?
thank you
 
i have no subscription, so i configured repository with
Code:
deb [URL]http://download.proxmox.com/debian[/URL] wheezy pve-no-subscription

but i receive same error...

this feature is avaible only for paid version of proxmox? or i could install pve-zsync?

thank you
 
sorry.... :)

i read a wiki and for test i would sync 1 VM from server1 to server2

i created a storage on server1 called "zfs1" and on server2 "zfs2"
on both zfs pool = rpool (automatic)

on server1 i run command
Code:
pve-zsync sync --source 401 --dest 22.22.22.22:401 --verbose --maxsnap 2
or
pve-zsync sync --source 401 --dest 22.22.22.22:rpool/zfs2 --verbose --maxsnap 2
i receive same error

Code:
root@22.22.22.22's password:
WARN: COMMAND:
        ssh root@22.22.22.22 -- zfs list -rt snapshot -Ho name rpool/zfs2/vm-401-disk-2@rep_default_2015-10-21_21:12:27
GET ERROR:
        cannot open 'rpool/zfs2/vm-401-disk-2@rep_default_2015-10-21_21:12:27': dataset does not exist
send from @ to rpool/vm-401-disk-2@rep_default_2015-10-21_21:19:42 estimated size is 4K
total estimated size is 4K
TIME        SENT   SNAPSHOT
root@22.22.22.22's password:
COMMAND:
        zfs send -v -- rpool/vm-401-disk-2@rep_default_2015-10-21_21:19:42 | ssh root@22.22.22.22 -- zfs recv -- rpool/zfs2/vm-401-disk-2@rep_default_2015-10-21_21:19:42
GET ERROR:
        cannot open 'rpool/zfs2/vm-401-disk-2': dataset does not exist
cannot receive new filesystem stream: dataset does not exist

another strange thing... server ask me twice root's password...

how to i sync a VMID 401 on other server?
i tried with fresh server, with VM 401 is present on server and on server 2...
nothing...

thank you
 
Hi,

if you use sync this means you sync the mashine one time and do not pare the server.
this is the reason why you get ask twice.

if you use create instead the server will be pared and ask only one time for the pw and never again.

can you please describe your setup (sever and zfs) in detail.
 
ok, thank you for help me :)

this is only for testing, then i go in production. so...

i have 2 server (minimal) with one disk sata and 1 network card.
during proxmox installation i choose:
file system ZFS (raid-0) because i have only one disk.
for both server
ip server 1: 192.168.0.1
ip server 2: 192.168.0.2

on server1 (gui proxmox)
add storage ZFS
zfs pool = rpool (there is only this)
id: zfs1

on server2 (gui proxmox)
add storage ZFS
zfs pool = rpool (there is only this)
id: zfs2

on server1 i created one VM (KVM) with VMID 401
i would replicated this VM on server2 every hour or 15minutes or other...

for test first time i run

Code:
pve-zsync sync --source 401 --dest 192.168.0.2:401 --verbose --maxsnap 2
attention on server2 i don't create VMID 401. server is empty, without VM

then i create same VM on server2 (identic hardware and disk) with same name (VMID 401)
and retry command as written above...

even error....

could i replicate a VM on server2?

thank you again :)
 
Ok now I understand.
this tool is not for syncing in PVE(at the moment).
it makes an backup sync.
what mean you have to recover manually.
the only thing what you will see is the disk on the target host and the config in /var/lib/pve-zsync

have a lock here.
https://pve.proxmox.com/wiki/PVE-zsync#Recovering_an_VM
 
ok, in my case how i could backup VMID 401 on server2, also only vm's disk...

Code:
pve-zsync sync --source 401 --dest 192.168.0.2:[COLOR=#000000][FONT=monospace]/var/lib/pve-zsync[/FONT][/COLOR] --verbose --maxsnap 2

or other command?

thank you
 
no you have to set in the dest parameter after the ip the zfs pool and if you have the subvol where you like to save the vmdisk.

this means in your case with out subvol
pve-zsync sync --source 401 --dest 192.168.0.2:rpool --verbose --maxsnap 2
 
tank you for you help, but semms not my destiny... :(

Code:
root@server1:~# pve-zsync sync --source 401 --dest 192.168.0.2:rpool --verbose --maxsnap 2
root@192.168.0.2's password:
WARN: COMMAND:
        ssh root@192.168.0.2 -- zfs list -rt snapshot -Ho name rpool/vm-401-disk-2@rep_default_2015-10-21_21:13:05
GET ERROR:
        cannot open 'rpool/vm-401-disk-2@rep_default_2015-10-21_21:13:05': dataset does not exist
send from @ to rpool/vm-401-disk-2@rep_default_2015-10-23_09:02:12 estimated size is 4K
total estimated size is 4K
TIME        SENT   SNAPSHOT
root@192.168.0.2's password:
COMMAND:
        zfs send -v -- rpool/vm-401-disk-2@rep_default_2015-10-23_09:02:12 | ssh root@192.168.0.2 -- zfs recv -- rpool/vm-401-disk-2@rep_default_2015-10-23_09:02:12
GET ERROR:
        Connection closed by 192.168.0.2

root@server1:~#

thank you againg.
now i search other way to incremntal copy/sync to another proxmox server my VM's disk.
 
can you send me the output from your source node.
zfs list -t all

I think you have already a snapshot on the source this is why he is not able to find the old on the dest server.
 
can you send me the output from your source node.
zfs list -t all

I think you have already a snapshot on the source this is why he is not able to find the old on the dest server.


here you are :)
Code:
root@server1:~#  zfs list -t all
NAME                                                  USED  AVAIL  REFER  MOUNTPOINT
rpool                                                25.8G  23.1G    96K  /rpool
rpool/ROOT                                            984M  23.1G    96K  /rpool/ROOT
rpool/ROOT/pve-1                                      984M  23.1G   984M  /
rpool/swap                                           4.25G  27.4G   376K  -
rpool/vm-401-disk-1                                  10.3G  33.4G    64K  -
rpool/vm-401-disk-1@rep_default_2015-10-21_21:04:27      0      -    64K  -
rpool/vm-401-disk-1@rep_default_2015-10-21_21:04:48      0      -    64K  -
rpool/vm-401-disk-1@rep_default_2015-10-21_21:08:49      0      -    64K  -
rpool/vm-401-disk-1@rep_default_2015-10-21_21:10:10      0      -    64K  -
rpool/vm-401-disk-2                                  10.3G  33.4G    64K  -
rpool/vm-401-disk-2@rep_default_2015-10-21_21:12:27      0      -    64K  -
rpool/vm-401-disk-2@rep_default_2015-10-21_21:13:05      0      -    64K  -
rpool/vm-401-disk-2@rep_default_2015-10-21_21:55:59      0      -    64K  -

i'm not take a snapshot... i don't read this in wiki...
i'm sorry but i don't know this filesystem...

thank you again
 
I will try to improve the error handling.

the problem is you have already snapshots and it try to replicate the delta of it but on the remote host there are no images.
please erase all snapshots like

zfs destroy rpool/vm-401-disk-1@<snapshot>

and start over.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!