diff --git a/templates/restic_access_Linux.j2 b/templates/restic_access_Linux.j2 index 554073d..ca0c313 100644 --- a/templates/restic_access_Linux.j2 +++ b/templates/restic_access_Linux.j2 @@ -4,7 +4,7 @@ # Source this file to work with restic on this host export RESTIC_REPOSITORY={{ restic_repos[item.repo].location }} -export RESTIC_PASSWORD="{{ restic_repos[item.repo].password | regex_escape() }}" +export RESTIC_PASSWORD='{{ restic_repos[item.repo].password | regex_replace('\'', '\'\\\'\'') }}' {% if restic_repos[item.repo].aws_access_key is defined %} export AWS_ACCESS_KEY_ID={{ restic_repos[item.repo].aws_access_key }} {% endif %} diff --git a/templates/restic_script_Linux.j2 b/templates/restic_script_Linux.j2 index df46df3..e6f42ea 100644 --- a/templates/restic_script_Linux.j2 +++ b/templates/restic_script_Linux.j2 @@ -4,7 +4,7 @@ # Use this file to create a Backup and prune existing data with one execution. export RESTIC_REPOSITORY={{ restic_repos[item.repo].location }} -export RESTIC_PASSWORD="{{ restic_repos[item.repo].password | regex_escape() }}" +export RESTIC_PASSWORD='{{ restic_repos[item.repo].password | regex_replace('\'', '\'\\\'\'') }}' BACKUP_NAME={{ item.name }} {% if restic_repos[item.repo].aws_access_key is defined %} export AWS_ACCESS_KEY_ID={{ restic_repos[item.repo].aws_access_key }}