+# backup.sh
+#
+# Backup up Unix-like computers
+#
+# itk@samfundet.no
+#
+# This script was first checked into RCS in 2000, and has since backed up a few
+# servers almost every day, whenever not broken.
+#
+# It's a bit peculiar, but quite effective. The following is worth keeping in
+# mind when hacking:
+#
+# KISS. And by that I mean really simple. Only regular Unix commands, please
+# (but GNU extensions are used and moreutils has to be installed).
+#
+# Because of the way we run this script from cron, informational logging goes
+# to stderr and warnings and errors to stdout. This way, we get mail whenever
+# stuff fails, and other output is redirected to the log file.
+#
+# The computers are backed up in parallel (but the filesystems on each
+# computer in serial). This is implemented highly simplistic, with forking
+# subshells. The script has no concept about threads, and stuff might go wrong,
+# which usually requires manual cleanups.
+#
+# The script is halfway Norwegian and halfway English. Newer modifications are
+# in English, we should probably stick to that.
+#
+# Known issues:
+#
+# o $R has no proper meaning because of the forking subshell stuff. We need a
+# more robust way of returning non-zero on errors, which we probably don't
+# right now.
+#
+
+# Configuration
+LOCKFILE=/home/backup/backuprun.lockfile
+confdir=/home/backup/conf/ # Configuration files
+storagedir=/backup # Where we keep backups
+maksantallfulle=3 # Number of full backups
+dagermellomfulle=30 # Days between full backups
+dagermellomfulleforfast=32 # Days between full backups for machines with fixed
+ # full-backup date (in case the fixed day gets missed)
+DAY_OF_MONTH=`date "+%d" | sed s/^0//` # from 1 to 31
+DATE=`date "+%Y%m%d%H%M"` #format: touch
+DATEs=`date "+%Y-%m-%d %H:%M"` #format: tar
+
+# Exclude-pattern