rsync: missing dash in "-archive"
Closed this issue · 2 comments
Which addon?
rsync
Describe the bug
In
Hassio-Addons/rsync/root/run.sh
Line 32 in a8990b1
-archive
is present. I believe that actually --archive
was meant.This effectively turns on the following options:
-a, --archive
: is the one we actually want-r, --recursive
: is already turned on by-a
-c, --checksum
: This is very bad! It means that every file has to be read as a whole on both the source and the destination to determine whether a file should be synced! Leads to unnecessary I/O load.-h, --human-readable
: output only, doesn't matter-i, --itemize-changes
: output only, doesn't matter-v, --verbose
: output only, doesn't matter-e, --rsh
: should be bad, because it tries to replace the remote shell command... don't know why it works nevertheless :)
To Reproduce
Trigger rsync
, watch iotop
or top
on the target machine
Expected behavior
Replace option by --archive
, removing the -c
option
System
(Bug found in source, versions shouldn't matter)
Home Assistant 2023.2.1
Supervisor 2023.01.1
Operating System 9.5
Nice finding. 👍
Will correct it on the next fixing run.
I also see that "-archive" wrong option as well I could not make this addon work even passwordless:
[17:54:17] INFO: Use private key from /ssl/rsync/id_rsa
[17:54:21] INFO: Sync /config -> /home/tmp with options "-archive --recursive --compress --delete --prune-empty-dirs"
++ rsync -archive --recursive --compress --delete --prune-empty-dirs -e 'ssh -p 22 -i /ssl/rsync/id_rsa -oStrictHostKeyChecking=no' /config myuser@10.0.0.141:/home/tmp
Warning: Permanently added '10.0.0.141' (ED25519) to the list of known hosts.
Permission denied, please try again.
Permission denied, please try again.
myuser@10.0.0.141: Permission denied (publickey,password).
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: unexplained error (code 255) at io.c(231) [sender=3.2.7]