jimsalterjrs / sanoid

These are policy-driven snapshot management and replication tools which use OpenZFS for underlying next-gen storage. (Btrfs support plans are shelved unless and until btrfs becomes reliable.)
http://www.openoid.net/products/
GNU General Public License v3.0
3.12k stars 306 forks source link

isn't numeric in numeric lt (<) at syncoid line 1162 #291

Closed peter-held closed 5 years ago

peter-held commented 5 years ago

Hi,

I get these messages when running syncoid:

Argument "incremental^Iautosnap_2018-11-21_17:00:00_hourly^Istorag..." isn't numeric in numeric lt (<) at syncoid line 1162.

Argument "full^Istorage/backup/computers/computer1..." isn't numeric in numeric lt (<) at syncoid line 1162.

Thanks.

phreaker0 commented 5 years ago

can you post your syncoid command? And also use the "--debug" flag and post the output. Latest master?

peter-held commented 5 years ago

Yes, latest master.

I'm trying to replicate a dataset from a backup server, that contains data from multiple servers, to another backup server.

The command is: ./syncoid --sshport=2222 --recursive --no-sync-snap --compress=gzip storage/backup/domain/computers root@nas1.domain.dom:storage/backup/domain/computers

Last part of the log: DEBUG: checking to see if storage/backup/domain/computers/ve1.domain.net/rpool/srv/vms/nas1.domain.net on /usr/bin/ssh -p 2222 -S /tmp/syncoid-root-root@nas1.domain.net-1542830651 root@nas1.domain.net is already in zfs receive using /usr/bin/ssh -p 2222 -S /tmp/syncoid-root-root@nas1.domain.net-1542830651 root@nas1.domain.net /bin/ps -Ao args= ... DEBUG: checking to see if target filesystem exists using "/usr/bin/ssh -p 2222 -S /tmp/syncoid-root-root@nas1.domain.net-1542830651 root@nas1.domain.net /sbin/zfs get -H name ''"'"'storage/backup/domain/computers/ve1.domain.net/rpool/srv/vms/nas1.domain.net'"'"'' 2>&1 |"... DEBUG: getting current value of receive_resume_token on storage/backup/domain/computers/ve1.domain.net/rpool/srv/vms/nas1.domain.net... /usr/bin/ssh -p 2222 -S /tmp/syncoid-root-root@nas1.domain.net-1542830651 root@nas1.domain.net /sbin/zfs get -H receive_resume_token ''"'"'storage/backup/domain/computers/ve1.domain.net/rpool/srv/vms/nas1.domain.net'"'"'' DEBUG: no receive token found DEBUG: getting list of snapshots on storage/backup/domain/computers/ve1.domain.net/rpool/srv/vms/nas1.domain.net using /sbin/zfs get -Hpd 1 -t snapshot guid,creation 'storage/backup/domain/computers/ve1.domain.net/rpool/srv/vms/nas1.domain.net' |... DEBUG: getting list of snapshots on storage/backup/domain/computers/ve1.domain.net/rpool/srv/vms/nas1.domain.net using /usr/bin/ssh -p 2222 -S /tmp/syncoid-root-root@nas1.domain.net-1542830651 root@nas1.domain.net /sbin/zfs get -Hpd 1 -t snapshot guid,creation ''"'"'storage/backup/domain/computers/ve1.domain.net/rpool/srv/vms/nas1.domain.net'"'"'' |... NEWEST SNAPSHOT: autosnap_2018-11-21_18:00:00_hourly DEBUG: getting current value of -p used on storage/backup/domain/computers/ve1.domain.net/rpool/srv/vms/nas1.domain.net... /usr/bin/ssh -p 2222 -S /tmp/syncoid-root-root@nas1.domain.net-1542830651 root@nas1.domain.net /sbin/zfs get -H -p used ''"'"'storage/backup/domain/computers/ve1.domain.net/rpool/srv/vms/nas1.domain.net'"'"'' DEBUG: checking to see if storage/backup/domain/computers/ve1.domain.net/rpool/srv/vms/nas1.domain.net on /usr/bin/ssh -p 2222 -S /tmp/syncoid-root-root@nas1.domain.net-1542830651 root@nas1.domain.net is already in zfs receive using /usr/bin/ssh -p 2222 -S /tmp/syncoid-root-root@nas1.domain.net-1542830651 root@nas1.domain.net /bin/ps -Ao args= ... DEBUG: rolling back target to storage/backup/domain/computers/ve1.domain.net/rpool/srv/vms/nas1.domain.net@autosnap_2018-11-20_07:00:00_hourly... /usr/bin/ssh -p 2222 -S /tmp/syncoid-root-root@nas1.domain.net-1542830651 root@nas1.domain.net /sbin/zfs rollback -R 'storage/backup/domain/computers/ve1.domain.net/rpool/srv/vms/nas1.domain.net'@'autosnap_2018-11-20_07:00:00_hourly' DEBUG: getting estimated transfer size from source using " /sbin/zfs send -nP -I 'storage/backup/domain/computers/ve1.domain.net/rpool/srv/vms/nas1.domain.net@autosnap_2018-11-20_07:00:00_hourly' 'storage/backup/domain/computers/ve1.domain.net/rpool/srv/vms/nas1.domain.net@autosnap_2018-11-21_18:00:00_hourly' 2>&1 |"... DEBUG: sendsize = incremental autosnap_2018-11-21_17:00:00_hourly storage/backup/domain/computers/ve1.domain.net/rpool/srv/vms/nas1.domain.net@autosnap_2018-11-21_18:00:00_hourly Argument "incremental^Iautosnap_2018-11-21_17:00:00_hourly^Istorag..." isn't numeric in numeric lt (<) at /mnt/Data/Scripts/sanoid/syncoid line 1162. Sending incremental storage/backup/domain/computers/ve1.domain.net/rpool/srv/vms/nas1.domain.net@autosnap_2018-11-20_07:00:00_hourly ... autosnap_2018-11-21_18:00:00_hourly (~ 4 KB): DEBUG: /sbin/zfs send -I 'storage/backup/domain/computers/ve1.domain.net/rpool/srv/vms/nas1.domain.net'@'autosnap_2018-11-20_07:00:00_hourly' 'storage/backup/domain/computers/ve1.domain.net/rpool/srv/vms/nas1.domain.net'@'autosnap_2018-11-21_18:00:00_hourly' | /usr/bin/pv -s 4096 | /bin/gzip -3 | /usr/bin/mbuffer -q -s 128k -m 16M 2>/dev/null | /usr/bin/ssh -p 2222 -S /tmp/syncoid-root-root@nas1.domain.net-1542830651 root@nas1.domain.net ' /usr/bin/mbuffer -q -s 128k -m 16M 2>/dev/null | /bin/zcat | /sbin/zfs receive -s -F '"'"'storage/backup/domain/computers/ve1.domain.net/rpool/srv/vms/nas1.domain.net'"'"''

phreaker0 commented 5 years ago

There is some error with send size estimation, can you run the command and post the output:

/sbin/zfs send -nP -I 'storage/backup/domain/computers/ve1.domain.net/rpool/srv/vms/nas1.domain.net@autosnap_2018-11-20_07:00:00_hourly' 'storage/backup/domain/computers/ve1.domain.net/rpool/srv/vms/nas1.domain.net@autosnap_2018-11-21_18:00:00_hourly' 2>&1

peter-held commented 5 years ago

incremental autosnap_2018-11-20_07:00:00_hourly storage/backup/domain/computers/ve1.domain.net/rpool/srv/vms/nas1.domain.net@autosnap_2018-11-20_08:00:00_hourly incremental autosnap_2018-11-20_08:00:00_hourly storage/backup/domain/computers/ve1.domain.net/rpool/srv/vms/nas1.domain.net@autosnap_2018-11-20_09:00:00_hourly incremental autosnap_2018-11-20_09:00:00_hourly storage/backup/domain/computers/ve1.domain.net/rpool/srv/vms/nas1.domain.net@autosnap_2018-11-20_10:00:00_hourly incremental autosnap_2018-11-20_10:00:00_hourly storage/backup/domain/computers/ve1.domain.net/rpool/srv/vms/nas1.domain.net@autosnap_2018-11-20_11:00:00_hourly incremental autosnap_2018-11-20_11:00:00_hourly storage/backup/domain/computers/ve1.domain.net/rpool/srv/vms/nas1.domain.net@autosnap_2018-11-20_12:00:00_hourly incremental autosnap_2018-11-20_12:00:00_hourly storage/backup/domain/computers/ve1.domain.net/rpool/srv/vms/nas1.domain.net@autosnap_2018-11-20_13:00:00_hourly incremental autosnap_2018-11-20_13:00:00_hourly storage/backup/domain/computers/ve1.domain.net/rpool/srv/vms/nas1.domain.net@autosnap_2018-11-20_14:00:00_hourly incremental autosnap_2018-11-20_14:00:00_hourly storage/backup/domain/computers/ve1.domain.net/rpool/srv/vms/nas1.domain.net@autosnap_2018-11-20_15:00:00_hourly incremental autosnap_2018-11-20_15:00:00_hourly storage/backup/domain/computers/ve1.domain.net/rpool/srv/vms/nas1.domain.net@autosnap_2018-11-20_15:23:13_daily incremental autosnap_2018-11-20_15:23:13_daily storage/backup/domain/computers/ve1.domain.net/rpool/srv/vms/nas1.domain.net@autosnap_2018-11-20_15:23:13_monthly incremental autosnap_2018-11-20_15:23:13_monthly storage/backup/domain/computers/ve1.domain.net/rpool/srv/vms/nas1.domain.net@autosnap_2018-11-20_16:00:12_hourly incremental autosnap_2018-11-20_16:00:12_hourly storage/backup/domain/computers/ve1.domain.net/rpool/srv/vms/nas1.domain.net@autosnap_2018-11-20_17:00:12_hourly incremental autosnap_2018-11-20_17:00:12_hourly storage/backup/domain/computers/ve1.domain.net/rpool/srv/vms/nas1.domain.net@autosnap_2018-11-20_18:00:12_hourly incremental autosnap_2018-11-20_18:00:12_hourly storage/backup/domain/computers/ve1.domain.net/rpool/srv/vms/nas1.domain.net@autosnap_2018-11-20_19:00:12_hourly incremental autosnap_2018-11-20_19:00:12_hourly storage/backup/domain/computers/ve1.domain.net/rpool/srv/vms/nas1.domain.net@autosnap_2018-11-20_20:00:05_hourly incremental autosnap_2018-11-20_20:00:05_hourly storage/backup/domain/computers/ve1.domain.net/rpool/srv/vms/nas1.domain.net@autosnap_2018-11-20_21:00:12_hourly incremental autosnap_2018-11-20_21:00:12_hourly storage/backup/domain/computers/ve1.domain.net/rpool/srv/vms/nas1.domain.net@autosnap_2018-11-20_22:00:12_hourly incremental autosnap_2018-11-20_22:00:12_hourly storage/backup/domain/computers/ve1.domain.net/rpool/srv/vms/nas1.domain.net@autosnap_2018-11-21_07:22:58_hourly incremental autosnap_2018-11-21_07:22:58_hourly storage/backup/domain/computers/ve1.domain.net/rpool/srv/vms/nas1.domain.net@autosnap_2018-11-21_07:22:58_daily incremental autosnap_2018-11-21_07:22:58_daily storage/backup/domain/computers/ve1.domain.net/rpool/srv/vms/nas1.domain.net@autosnap_2018-11-21_08:00:00_hourly incremental autosnap_2018-11-21_08:00:00_hourly storage/backup/domain/computers/ve1.domain.net/rpool/srv/vms/nas1.domain.net@autosnap_2018-11-21_09:00:00_hourly incremental autosnap_2018-11-21_09:00:00_hourly storage/backup/domain/computers/ve1.domain.net/rpool/srv/vms/nas1.domain.net@autosnap_2018-11-21_10:00:00_hourly incremental autosnap_2018-11-21_10:00:00_hourly storage/backup/domain/computers/ve1.domain.net/rpool/srv/vms/nas1.domain.net@autosnap_2018-11-21_11:00:00_hourly incremental autosnap_2018-11-21_11:00:00_hourly storage/backup/domain/computers/ve1.domain.net/rpool/srv/vms/nas1.domain.net@autosnap_2018-11-21_12:00:00_hourly incremental autosnap_2018-11-21_12:00:00_hourly storage/backup/domain/computers/ve1.domain.net/rpool/srv/vms/nas1.domain.net@autosnap_2018-11-21_13:00:00_hourly incremental autosnap_2018-11-21_13:00:00_hourly storage/backup/domain/computers/ve1.domain.net/rpool/srv/vms/nas1.domain.net@autosnap_2018-11-21_14:00:00_hourly incremental autosnap_2018-11-21_14:00:00_hourly storage/backup/domain/computers/ve1.domain.net/rpool/srv/vms/nas1.domain.net@autosnap_2018-11-21_15:00:00_hourly incremental autosnap_2018-11-21_15:00:00_hourly storage/backup/domain/computers/ve1.domain.net/rpool/srv/vms/nas1.domain.net@autosnap_2018-11-21_16:00:00_hourly incremental autosnap_2018-11-21_16:00:00_hourly storage/backup/domain/computers/ve1.domain.net/rpool/srv/vms/nas1.domain.net@autosnap_2018-11-21_17:00:00_hourly incremental autosnap_2018-11-21_17:00:00_hourly storage/backup/domain/computers/ve1.domain.net/rpool/srv/vms/nas1.domain.net@autosnap_2018-11-21_18:00:00_hourly

phreaker0 commented 5 years ago

What zfs version are you using? This command should return the estimated send size and not a list of snapshots steps.

peter-held commented 5 years ago

FreeNAS

FreeBSD nas1.domain.net 11.1-STABLE FreeBSD 11.1-STABLE #0 r321665+9902d126c39(freenas/11.1-stable): Tue Aug 21 12:24:37 EDT 2018 root@nemesis.tn.ixsystems.com:/freenas-11-releng/freenas/_BE/objs/freenas-11-releng/freenas/_BE/os/sys/FreeNAS.amd64 amd64

peter-held commented 5 years ago

In the zfs manual is the same as on linux:

FreeNAS -P, --parsable Print machine-parsable verbose information about the stream package generated.

Linux -P, --parsable Print machine-parsable verbose information about the stream package generated.

peter-held commented 5 years ago

On Linux the output is:

incremental autosnap_2018-11-21_15:00:00_hourly rpool/srv/vms/nas1.domain.net@autosnap_2018-11-21_16:00:00_hourly 624 incremental autosnap_2018-11-21_16:00:00_hourly rpool/srv/vms/nas1.domain.net@autosnap_2018-11-21_17:00:00_hourly 624 incremental autosnap_2018-11-21_17:00:00_hourly rpool/srv/vms/nas1.domain.net@autosnap_2018-11-21_18:00:00_hourly 624 size 1872

phreaker0 commented 5 years ago

thanks, wasn't aware that the command also outputs the snapshot steps. And on linux the needed sizes are there but apparently on FreeBSD 11.1 not. Sanoid should catch that case.

peter-held commented 5 years ago

Thank you, too.