From ddaf7e5c706e876c811ad0d4c054ee955c4a1cd1 Mon Sep 17 00:00:00 2001 From: Jacob Coffee Date: Wed, 14 Aug 2024 16:47:05 -0500 Subject: [PATCH] feat: migrate to new rdiff command (#468) Closes #458 --- salt/backup/client/init.sls | 4 ++-- salt/backup/server/init.sls | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/salt/backup/client/init.sls b/salt/backup/client/init.sls index 1e26f23b..edaf2584 100644 --- a/salt/backup/client/init.sls +++ b/salt/backup/client/init.sls @@ -39,9 +39,9 @@ include: - context: pre_script: '{{ config.get('pre_script', ":") }}' {% if grains["oscodename"] == "noble" -%} - remote_command: '/usr/bin/rdiff-backup --terminal-verbosity 1 {%- for exclude in config.get('exclude', []) %} --exclude {{ exclude }} {%- endfor %} --remote-schema "ssh -i /etc/backup/.ssh/id_rsa_{{ backup }} -C %s rdiff-backup --server" backup --no-eas {{ config['source_directory'] }} {{ config['target_user'] }}@{{ config['target_host'] }}::{{ config['target_directory'] }}' + remote_command: '/usr/bin/rdiff-backup --terminal-verbosity 1 {%- for exclude in config.get('exclude', []) %} --exclude {{ exclude }} {%- endfor %} --remote-schema "ssh -i /etc/backup/.ssh/id_rsa_{{ backup }} -C %s rdiff-backup server" backup --no-eas {{ config['source_directory'] }} {{ config['target_user'] }}@{{ config['target_host'] }}::{{ config['target_directory'] }}' {% else %} - remote_command: '/usr/bin/rdiff-backup --terminal-verbosity 1 {%- for exclude in config.get('exclude', []) %} --exclude {{ exclude }} {%- endfor %} --no-eas --remote-schema "ssh -i /etc/backup/.ssh/id_rsa_{{ backup }} -C %s rdiff-backup --server" {{ config['source_directory'] }} {{ config['target_user'] }}@{{ config['target_host'] }}::{{ config['target_directory'] }}' + remote_command: '/usr/bin/rdiff-backup --terminal-verbosity 1 {%- for exclude in config.get('exclude', []) %} --exclude {{ exclude }} {%- endfor %} --no-eas --remote-schema "ssh -i /etc/backup/.ssh/id_rsa_{{ backup }} -C %s rdiff-backup server" {{ config['source_directory'] }} {{ config['target_user'] }}@{{ config['target_host'] }}::{{ config['target_directory'] }}' {% endif %} post_script: '{{ config.get('post_script', ":") }}' cleanup_script: '{{ config.get('cleanup_script', ":") }}' diff --git a/salt/backup/server/init.sls b/salt/backup/server/init.sls index 157120c8..180b2948 100644 --- a/salt/backup/server/init.sls +++ b/salt/backup/server/init.sls @@ -15,7 +15,7 @@ include: - names: - {{ config['authorized_key'] }} - options: - - command="rdiff-backup --server" + - command="rdiff-backup server" - no-pty - no-port-forwarding - no-agent-forwarding