modules/backup: Speed up backup time by skipping checks and only show the last snapshot
This commit is contained in:
parent
3d68c66b44
commit
2cdf09c5ae
@ -44,12 +44,10 @@ let
|
||||
export RESTIC_PROGRESS_FPS=0.1
|
||||
export RESTIC_CACHE_DIR=/var/cache/restic
|
||||
|
||||
restic snapshots || restic init
|
||||
restic snapshots --latest 1 || restic init
|
||||
|
||||
restic backup ${optionalString (jobOptions.exclude != []) "--exclude-file ${pkgs.writeText "clerie-backup-${jobName}-${targetName}-excludes" (concatStringsSep "\n" jobOptions.exclude)}"} ${escapeShellArgs jobOptions.paths}
|
||||
|
||||
restic check
|
||||
|
||||
${optionalString (config.clerie.monitoring.enable) ''
|
||||
echo "clerie_backup_last_successful_run_time{backup_job=\"${jobName}\", backup_target=\"${targetName}\"} $(date +%s)" > /var/lib/prometheus-node-exporter/textfiles/clerie-backup-${jobName}-${targetName}.prom
|
||||
''}
|
||||
|
Loading…
Reference in New Issue
Block a user