mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2025-04-29 04:17:07 +00:00
removed strict host checking for all backup operations
Signed-off-by: Bernard `Guyzmo` Pratz <guyzmo+github@m0g.net>
This commit is contained in:
parent
c327736da2
commit
6b334d1e07
@ -58,7 +58,7 @@ def backup_status(env):
|
||||
"--gpg-options", "--cipher-algo=AES256",
|
||||
"--log-fd", "1",
|
||||
"--ssh-options='-i /root/.ssh/id_rsa_miab'",
|
||||
"--rsync-options=-e \"/usr/bin/ssh -oBatchMode=yes -p 22 -i /root/.ssh/id_rsa_miab\"",
|
||||
"--rsync-options=-e \"/usr/bin/ssh -oStrictHostKeyChecking=no -oBatchMode=yes -p 22 -i /root/.ssh/id_rsa_miab\"",
|
||||
config["target"],
|
||||
],
|
||||
get_env(env),
|
||||
@ -252,7 +252,7 @@ def perform_backup(full_backup):
|
||||
"--gpg-options", "--cipher-algo=AES256",
|
||||
env["STORAGE_ROOT"],
|
||||
"--ssh-options='-i /root/.ssh/id_rsa_miab'",
|
||||
"--rsync-options=-e \"/usr/bin/ssh -oBatchMode=yes -p 22 -i /root/.ssh/id_rsa_miab\"",
|
||||
"--rsync-options=-e \"/usr/bin/ssh -oStrictHostKeyChecking=no -oBatchMode=yes -p 22 -i /root/.ssh/id_rsa_miab\"",
|
||||
config["target"],
|
||||
"--allow-source-mismatch"
|
||||
],
|
||||
@ -277,7 +277,7 @@ def perform_backup(full_backup):
|
||||
"--archive-dir", backup_cache_dir,
|
||||
"--force",
|
||||
"--ssh-options='-i /root/.ssh/id_rsa_miab'",
|
||||
"--rsync-options=-e \"/usr/bin/ssh -oBatchMode=yes -p 22 -i /root/.ssh/id_rsa_miab\"",
|
||||
"--rsync-options=-e \"/usr/bin/ssh -oStrictHostKeyChecking=no -oBatchMode=yes -p 22 -i /root/.ssh/id_rsa_miab\"",
|
||||
config["target"]
|
||||
],
|
||||
get_env(env))
|
||||
@ -294,7 +294,7 @@ def perform_backup(full_backup):
|
||||
"--archive-dir", backup_cache_dir,
|
||||
"--force",
|
||||
"--ssh-options='-i /root/.ssh/id_rsa_miab'",
|
||||
"--rsync-options=-e \"/usr/bin/ssh -oBatchMode=yes -p 22 -i /root/.ssh/id_rsa_miab\"",
|
||||
"--rsync-options=-e \"/usr/bin/ssh -oStrictHostKeyChecking=no -oBatchMode=yes -p 22 -i /root/.ssh/id_rsa_miab\"",
|
||||
config["target"]
|
||||
],
|
||||
get_env(env))
|
||||
@ -334,7 +334,7 @@ def run_duplicity_verification():
|
||||
"--archive-dir", backup_cache_dir,
|
||||
"--exclude", backup_root,
|
||||
"--ssh-options='-i /root/.ssh/id_rsa_miab'",
|
||||
"--rsync-options=-e \"/usr/bin/ssh -oBatchMode=yes -p 22 -i /root/.ssh/id_rsa_miab\"",
|
||||
"--rsync-options=-e \"/usr/bin/ssh -oStrictHostKeyChecking=no -oBatchMode=yes -p 22 -i /root/.ssh/id_rsa_miab\"",
|
||||
config["target"],
|
||||
env["STORAGE_ROOT"],
|
||||
], get_env(env))
|
||||
@ -348,7 +348,7 @@ def run_duplicity_restore(args):
|
||||
"restore",
|
||||
"--archive-dir", backup_cache_dir,
|
||||
"--ssh-options='-i /root/.ssh/id_rsa_miab'",
|
||||
"--rsync-options=-e \"/usr/bin/ssh -oBatchMode=yes -p 22 -i /root/.ssh/id_rsa_miab\"",
|
||||
"--rsync-options=-e \"/usr/bin/ssh -oStrictHostKeyChecking=no -oBatchMode=yes -p 22 -i /root/.ssh/id_rsa_miab\"",
|
||||
config["target"],
|
||||
] + args,
|
||||
get_env(env))
|
||||
@ -488,7 +488,6 @@ def get_backup_config(env, for_save=False, for_ui=False):
|
||||
if config["target"] == "local":
|
||||
# Expand to the full URL.
|
||||
config["target"] = "file://" + config["file_target_directory"]
|
||||
elif config["target"].startswith('rsync'):
|
||||
ssh_pub_key = os.path.join('/root', '.ssh', 'id_rsa_miab.pub')
|
||||
if os.path.exists(ssh_pub_key):
|
||||
config["ssh_pub_key"] = open(ssh_pub_key, 'r').read()
|
||||
|
Loading…
Reference in New Issue
Block a user