duplicacy icon indicating copy to clipboard operation
duplicacy copied to clipboard

sftp connection handshake error doesn't produce non-zero exit code

Open azinchen opened this issue 5 years ago • 1 comments

As many other people, I found duplicacy as great replacement for Crashplan. For personal needs I created my own duplicacy container for Docker https://github.com/azinchen/duplicacy, with the latest version of duplicacy, arm architecture support, retention policies, email notification.

I my home environment I backup my NAS on usb hdd connected to remote home router. Right now 7 parallel duplicacy backup run in the same time via cron, and usually random two of them fail, but without returning error code.

Repository set to /data
Storage set to sftp://[email protected]//mnt/sda1/backup/nas
Failed to load the SFTP storage at sftp://[email protected]//mnt/sda1/backup/nas: ssh: handshake failed: read tcp 192.168.96.11:38282->192.168.2.1:22: read: connection reset by peer
Backup COMPLETED, duration 00:00:01

The last log line is from my script, and it means that duplicacy exit code is zero.

Another log:

Storage set to sftp://[email protected]//mnt/sda1/backup/nas
Failed to load the SFTP storage at sftp://[email protected]//mnt/sda1/backup/nas: ssh: handshake failed: EOF
Backup COMPLETED, duration 00:00:01

azinchen avatar Oct 19 '19 05:10 azinchen

More logs. Now sftp server were down during backup:

Encountered an error (failed to send packet header: EOF); retry after 1 second(s)
Failed to upload the chunk 400a59dc9913e1bbf8822c78e7df0fde8a0c766dfb63fdaaf781eb92e52ffeef: dial tcp 192.168.2.1:22: connect: connection refused
Incomplete snapshot saved to /config/incomplete
Backup COMPLETED, duration 04:51:55

azinchen avatar Oct 22 '19 20:10 azinchen