fix(rsync-backup): Provide default port 22 for rsync usage in backup.py (#2226)
Co-authored-by: Hugh Secker-Walker <hsw+miac@hodain.net>
This commit is contained in:
parent
5e3e4a2161
commit
4408cb1fba
|
@ -221,6 +221,8 @@ def get_duplicity_additional_args(env):
|
|||
port = urlsplit(config["target"]).port
|
||||
except ValueError:
|
||||
port = 22
|
||||
if port is None:
|
||||
port = 22
|
||||
|
||||
return [
|
||||
f"--ssh-options= -i /root/.ssh/id_rsa_miab -p {port}",
|
||||
|
@ -424,6 +426,8 @@ def list_target_files(config):
|
|||
port = target.port
|
||||
except ValueError:
|
||||
port = 22
|
||||
if port is None:
|
||||
port = 22
|
||||
|
||||
target_path = target.path
|
||||
if not target_path.endswith('/'):
|
||||
|
|
Loading…
Reference in New Issue