X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=modules%2Frole%2Fmanifests%2Fbackup.pp;h=bdc35d5326966c36335d188c9e9ffb07f5e2edce;hb=060960b84cec5ffd96752f8819e50c03c1edb82e;hp=510a8ef65fd470f5cf032c342635c5cabc9196cc;hpb=2859008efe8f0a75344c7ba1c9c6e4d589f92da3;p=perso%2FImmae%2FProjets%2FPuppet.git diff --git a/modules/role/manifests/backup.pp b/modules/role/manifests/backup.pp index 510a8ef..bdc35d5 100644 --- a/modules/role/manifests/backup.pp +++ b/modules/role/manifests/backup.pp @@ -13,6 +13,10 @@ class role::backup ( include "profile::tools" include "profile::xmr_stak" include "profile::known_hosts" + include "profile::boinc" + include "profile::monitoring" + + include "role::backup::postgresql" ensure_packages(["rsync"]) @@ -46,7 +50,7 @@ class role::backup ( command => $backup_script, user => $user, minute => 25, - hour => 3, + hour => "3,15", require => Concat[$backup_script], } @@ -66,6 +70,7 @@ class role::backup ( $dirname = $infos["name"] $login = $infos["login"] $host = $infos["host"] + $port = if $infos.dig("port") { $infos.dig("port") } else { 22 } $dest = "$login@$host" $base = "$mountpoint/$dirname" $nbr = $infos["nbr"] @@ -121,5 +126,11 @@ class role::backup ( order => "$order_dirname-$order_part", } } + + @profile::monitoring::local_service { "Last backup in $base is not too old": + local => { + check_command => "check_last_file_date!$base!14", + } + } } }