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',