From f2acc0a37b790cf49dce16e286e1c1f8dff1367f Mon Sep 17 00:00:00 2001 From: Sam Al-Sapti Date: Sat, 11 Feb 2023 20:55:15 +0100 Subject: [PATCH] Avoid connection close when processing huge amounts of unchanged data --- roles/docker/tasks/services/restic_backup.yml | 8 ++++++++ roles/docker/templates/restic.ssh.config.j2 | 3 +++ 2 files changed, 11 insertions(+) create mode 100644 roles/docker/templates/restic.ssh.config.j2 diff --git a/roles/docker/tasks/services/restic_backup.yml b/roles/docker/tasks/services/restic_backup.yml index e482e26..1cdc6af 100644 --- a/roles/docker/tasks/services/restic_backup.yml +++ b/roles/docker/tasks/services/restic_backup.yml @@ -31,6 +31,14 @@ mode: '0644' state: touch +- name: Create SSH config + template: + src: restic.ssh.config.j2 + dest: "{{ services.restic.volume_folder }}/ssh/config" + owner: root + group: root + mode: '0600' + - name: Setup restic backup docker_compose: project_name: restic_backup diff --git a/roles/docker/templates/restic.ssh.config.j2 b/roles/docker/templates/restic.ssh.config.j2 new file mode 100644 index 0000000..1b6b024 --- /dev/null +++ b/roles/docker/templates/restic.ssh.config.j2 @@ -0,0 +1,3 @@ +Host {{ services.restic.domain }} + ServerAliveInterval 60 + ServerAliveCountMax 240