3 # entry point for inittab (or perhaps cron) to run the backups.
5 # This file is part of chiark backup, a system for backing up GNU/Linux and
6 # other UN*X-compatible machines, as used on chiark.greenend.org.uk.
9 # Copyright (C) 1997-1998,2000-2001 Ian Jackson <ian@chiark.greenend.org.uk>
10 # Copyright (C) 1999 Peter Maydell <pmaydell@chiark.greenend.org.uk>
12 # This is free software; you can redistribute it and/or modify it under the
13 # terms of the GNU General Public License as published by the Free Software
14 # Foundation; either version 2, or (at your option) any later version.
16 # This is distributed in the hope that it will be useful, but WITHOUT ANY
17 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
18 # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
21 # You should have received a copy of the GNU General Public License along
22 # with this program; if not, write to the Free Software Foundation, Inc.,
23 # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25 cd /var/lib/chiark-backup
26 PATH=/usr/share/chiark-backup:$PATH export PATH
28 if [ "x$1" != test ]; then
33 rm -f this-status p p2
34 echo 'FAILED to start dump script' >this-status
36 # Here we go : run 'full', which (name notwithstanding) handles
37 # both full and incremental backups, according to the ID of the
39 full 2>&1 | tee this-log
41 status=`cat this-status 2>/dev/null`
43 # Mail a report to somewhere appropriate; -odq removed (means just
44 # queue message, don't try to deliver) because it just delays the
45 # message (you might want that if mail was one of the services turned
46 # off for the duration of the backup, though).
47 cat <<END - this-log | /usr/lib/sendmail -oi -om -oee -t
49 Subject: Dump Report: $status
55 if [ "x$1" != test ]; then
56 # Bring the system up as multiuser again