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