Skip to content

Commit

Permalink
feat: migrate to new rdiff command (#468)
Browse files Browse the repository at this point in the history
Closes #458
  • Loading branch information
JacobCoffee authored Aug 14, 2024
1 parent 0b91042 commit ddaf7e5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions salt/backup/client/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -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', ":") }}'
Expand Down
2 changes: 1 addition & 1 deletion salt/backup/server/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ddaf7e5

Please sign in to comment.