diff --git a/management/backup.py b/management/backup.py index 32d77d1a..e8aca327 100755 --- a/management/backup.py +++ b/management/backup.py @@ -477,6 +477,10 @@ 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.pub') + if os.path.exists(ssh_pub_key): + config["ssh_pub_key"] = open(ssh_pub_key, 'r').read() return config diff --git a/management/templates/system-backup.html b/management/templates/system-backup.html index 04c2c8e0..1511125c 100644 --- a/management/templates/system-backup.html +++ b/management/templates/system-backup.html @@ -37,9 +37,6 @@ they are safe to store anywhere.
Separately copy the encryption password from to a safe and secure location. You will need this file to decrypt backup files.
-Separately copy the SSH public key from /root/.ssh/id_rsa.pub - and add it to your backup account on your remote server, in the - ~/.ssh/authorized_keys file.
@@ -61,6 +58,17 @@ +