From b7e13a89efb64279c7ba1ab81327987b5fbcb4ae Mon Sep 17 00:00:00 2001 From: Joshua Hoblitt Date: Thu, 26 Sep 2024 11:14:39 -0700 Subject: [PATCH] (role/rke2{agent,server}) update backup dirs to include rke2 tls certs --- hieradata/role/rke2agent.yaml | 7 +++++-- hieradata/role/rke2server.yaml | 7 +++++-- spec/hosts/roles/rke2agent_spec.rb | 8 ++++++-- spec/hosts/roles/rke2server_spec.rb | 8 ++++++-- 4 files changed, 22 insertions(+), 8 deletions(-) diff --git a/hieradata/role/rke2agent.yaml b/hieradata/role/rke2agent.yaml index ad7bc2200f..bc8c4334a0 100644 --- a/hieradata/role/rke2agent.yaml +++ b/hieradata/role/rke2agent.yaml @@ -17,9 +17,12 @@ restic::repositories: backup_path: - "/etc/cni" - "/etc/rancher" - - "/var/lib/rancher/rke2/agent" + - "/var/lib/rancher/rke2" - "/var/lib/rook" - backup_flags: "--exclude=/var/lib/rook/rook-ceph/log" + backup_flags: + - "--exclude=/var/lib/rancher/rke2/agent/containerd" + - "--exclude=/var/lib/rancher/rke2/agent/logs" + - "--exclude=/var/lib/rook/rook-ceph/log" backup_timer: "*-*-* 09:00:00" enable_forget: true forget_timer: "Mon..Sun 23:00:00" diff --git a/hieradata/role/rke2server.yaml b/hieradata/role/rke2server.yaml index 68dbf7e0c7..2cff375f83 100644 --- a/hieradata/role/rke2server.yaml +++ b/hieradata/role/rke2server.yaml @@ -105,9 +105,12 @@ restic::repositories: backup_path: - "/etc/cni" - "/etc/rancher" - - "/var/lib/rancher/rke2/server/db/snapshots" + - "/var/lib/rancher/rke2" - "/var/lib/rook" - backup_flags: "--exclude=/var/lib/rook/rook-ceph/log" + backup_flags: + - "--exclude=/var/lib/rancher/rke2/agent/containerd" + - "--exclude=/var/lib/rancher/rke2/agent/logs" + - "--exclude=/var/lib/rook/rook-ceph/log" backup_timer: "*-*-* 09:00:00" enable_forget: true forget_timer: "Mon..Sun 23:00:00" diff --git a/spec/hosts/roles/rke2agent_spec.rb b/spec/hosts/roles/rke2agent_spec.rb index c2b60877ae..425255b62b 100644 --- a/spec/hosts/roles/rke2agent_spec.rb +++ b/spec/hosts/roles/rke2agent_spec.rb @@ -52,10 +52,14 @@ backup_path: %w[ /etc/cni /etc/rancher - /var/lib/rancher/rke2/agent + /var/lib/rancher/rke2 /var/lib/rook ], - backup_flags: '--exclude=/var/lib/rook/rook-ceph/log', + backup_flags: %w[ + --exclude=/var/lib/rancher/rke2/agent/containerd + --exclude=/var/lib/rancher/rke2/agent/logs + --exclude=/var/lib/rook/rook-ceph/log + ], backup_timer: '*-*-* 09:00:00', enable_forget: true, forget_timer: 'Mon..Sun 23:00:00', diff --git a/spec/hosts/roles/rke2server_spec.rb b/spec/hosts/roles/rke2server_spec.rb index 8e22da59f5..4061cf40fe 100644 --- a/spec/hosts/roles/rke2server_spec.rb +++ b/spec/hosts/roles/rke2server_spec.rb @@ -66,10 +66,14 @@ backup_path: %w[ /etc/cni /etc/rancher - /var/lib/rancher/rke2/server/db/snapshots + /var/lib/rancher/rke2 /var/lib/rook ], - backup_flags: '--exclude=/var/lib/rook/rook-ceph/log', + backup_flags: %w[ + --exclude=/var/lib/rancher/rke2/agent/containerd + --exclude=/var/lib/rancher/rke2/agent/logs + --exclude=/var/lib/rook/rook-ceph/log + ], backup_timer: '*-*-* 09:00:00', enable_forget: true, forget_timer: 'Mon..Sun 23:00:00',