blob: 48e8cf8e6dd37749766265756a61956400570d74 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
#!/bin/sh
# This script is run whenever bbackupd changes state or encounters a
# problem which requires the system administrator to assist:
#
# 1) The store is full, and no more data can be uploaded.
# 2) Some files or directories were not readable.
# 3) A backup run starts or finishes.
#
# The default script emails the system administrator, except for backups
# starting and stopping, where it does nothing.
SUBJECT="BACKUP PROBLEM on host debian-unstable"
SENDTO="chris"
if [ "$1" = "" ]; then
echo "Usage: $0 <store-full|read-error|backup-ok|backup-error|backup-start|backup-finish>" >&2
exit 2
elif [ "$1" = store-full ]; then
sendmail: $SENDTO <<EOM
Subject: $SUBJECT (store full)
To: $SENDTO
The store account for debian-unstable is full.
=============================
FILES ARE NOT BEING BACKED UP
=============================
Please adjust the limits on account 1234567 on server localhost.
EOM
elif [ "$1" = read-error ]; then
sendmail: $SENDTO <<EOM
Subject: $SUBJECT (read errors)
To: $SENDTO
Errors occured reading some files or directories for backup on debian-unstable.
===================================
THESE FILES ARE NOT BEING BACKED UP
===================================
Check the logs on debian-unstable for the files and directories which caused
these errors, and take appropriate action.
Other files are being backed up.
EOM
elif [ "$1" = backup-start -o "$1" = backup-finish -o "$1" = backup-ok ]; then
# do nothing by default
true
else
sendmail: $SENDTO <<EOM
Subject: $SUBJECT (unknown)
To: $SENDTO
The backup daemon on debian-unstable reported an unknown error ($1).
==========================
FILES MAY NOT BE BACKED UP
==========================
Please check the logs on debian-unstable.
EOM
fi
|