Improve VM backups, configure backups on "her" #528

Merged
raucao merged 3 commits from feature/backup_improvements into master 2023-12-05 17:18:41 +00:00
2 changed files with 4 additions and 4 deletions
Showing only changes of commit b1763cd032 - Show all commits

View File

@ -45,9 +45,9 @@
"kosmos_kvm": {
"backup": {
"nodes_excluded": [
"garage-2", "garage-3", "garage-4",
"postgres-5",
"rsk-mainnet-2", "rsk-testnet-3"
"garage-",
"rsk-",
"postgres-5"
]
}
},

View File

@ -54,7 +54,7 @@ end
vm_domains = search(:node, "role:kvm_guest").map{|n| n["hostname"] } \
& `virsh list --name`.strip.chomp.split("\n")
vm_domains.reject! { |d| node["kosmos_kvm"]["backup"]["nodes_excluded"].include?(d) }
vm_domains.reject! { |d| node["kosmos_kvm"]["backup"]["nodes_excluded"].any?{ |n| d.match?(/^#{n}/) } }
template "/root/backups/backup_all_vms.sh" do
source "backup_all_vms.sh.erb"