Projet

Général

Profil

Paste
Télécharger au format
Statistiques
| Branche: | Révision:

root / plugins / backup / backup.sh @ c3660c2a

Historique | Voir | Annoter | Télécharger (518 octets)

1 6e714d72 Aron Novak
#!/bin/sh
2
3
# Configuration directives, edit before first use.
4
BACKUP_DIR=/path/to/your/backups
5
# How old backups should be considered as non-yound anymore in [days].
6
LIFETIME=2
7
8
# The situation is critical if there are no young files, the backup is down.
9
case $1 in
10
   config)
11
        cat <<'EOM'
12
graph_title Number of young files at backup directory
13
graph_vlabel number
14
autobackup.label number
15
autobackup.critical 1:
16
EOM
17
        exit 0;;
18
esac
19
20
printf "autobackup.value "
21
find $BACKUP_DIR  -mtime -$LIFETIME | wc  -l