summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Makefile.am49
-rw-r--r--scripts/Makefile.in705
-rw-r--r--scripts/backup-specs100
-rw-r--r--scripts/backup.in253
-rw-r--r--scripts/backup.sh.in347
-rw-r--r--scripts/dump-remind.in103
-rw-r--r--scripts/restore.in229
7 files changed, 1786 insertions, 0 deletions
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
new file mode 100644
index 0000000..a250a66
--- /dev/null
+++ b/scripts/Makefile.am
@@ -0,0 +1,49 @@
+# Copyright (C) 2004, 2006 Free Software Foundation, Inc.
+
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2, or (at your option)
+## any later version.
+
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+## 02110-1301, USA.
+
+BACKUP_LIBEXEC_SCRIPTS_LIST=backup.sh dump-remind
+BACKUP_SBIN_SCRIPTS_LIST=backup restore
+libexec_SCRIPTS=@BACKUP_LIBEXEC_SCRIPTS@
+AM_INSTALLCHECK_STD_OPTIONS_EXEMPT=backup.sh dump-remind
+sbin_SCRIPTS=@BACKUP_SBIN_SCRIPTS@
+EXTRA_SCRIPTS=tarcat
+EXTRA_DIST=\
+ backup.sh.in\
+ backup.in\
+ restore.in\
+ dump-remind.in\
+ backup-specs
+CLEANFILES=backup.sh backup restore dump-remind
+
+SED_CMD="s,\@libexecdir\@,$(libexecdir),;\
+ s,\@sysconfdir\@,$(sysconfdir),;\
+ s,\@PACKAGE_NAME\@,$(PACKAGE_NAME),;\
+ s,\@VERSION\@,$(VERSION),;\
+ s,\@PACKAGE_BUGREPORT\@,$(PACKAGE_BUGREPORT),;\
+ s,\@DATE_FORMAT_OK\@,$(DATE_FORMAT_OK),;@BACKUP_SED_COND@"
+
+backup.sh: $(srcdir)/backup.sh.in
+ sed $(SED_CMD) $? > $@
+
+backup: $(srcdir)/backup.in
+ sed $(SED_CMD) $? > $@
+
+restore: $(srcdir)/restore.in
+ sed $(SED_CMD) $? > $@
+
+dump-remind: $(srcdir)/dump-remind.in
+ sed $(SED_CMD) $? > $@
diff --git a/scripts/Makefile.in b/scripts/Makefile.in
new file mode 100644
index 0000000..a28170e
--- /dev/null
+++ b/scripts/Makefile.in
@@ -0,0 +1,705 @@
+# Makefile.in generated by automake 1.10a from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# Copyright (C) 2004, 2006 Free Software Foundation, Inc.
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = scripts
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/absolute-header.m4 \
+ $(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/allocsa.m4 \
+ $(top_srcdir)/m4/argmatch.m4 $(top_srcdir)/m4/argp.m4 \
+ $(top_srcdir)/m4/backupfile.m4 $(top_srcdir)/m4/bison.m4 \
+ $(top_srcdir)/m4/canonicalize-lgpl.m4 \
+ $(top_srcdir)/m4/chdir-long.m4 $(top_srcdir)/m4/chown.m4 \
+ $(top_srcdir)/m4/clock_time.m4 \
+ $(top_srcdir)/m4/close-stream.m4 $(top_srcdir)/m4/closeout.m4 \
+ $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/d-ino.m4 \
+ $(top_srcdir)/m4/dirfd.m4 $(top_srcdir)/m4/dirname.m4 \
+ $(top_srcdir)/m4/dos.m4 $(top_srcdir)/m4/double-slash-root.m4 \
+ $(top_srcdir)/m4/dup2.m4 $(top_srcdir)/m4/eealloc.m4 \
+ $(top_srcdir)/m4/eoverflow.m4 $(top_srcdir)/m4/error.m4 \
+ $(top_srcdir)/m4/exclude.m4 $(top_srcdir)/m4/exitfail.m4 \
+ $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/fchdir.m4 \
+ $(top_srcdir)/m4/fcntl-safer.m4 $(top_srcdir)/m4/fcntl_h.m4 \
+ $(top_srcdir)/m4/fileblocks.m4 $(top_srcdir)/m4/float_h.m4 \
+ $(top_srcdir)/m4/fnmatch.m4 $(top_srcdir)/m4/fpending.m4 \
+ $(top_srcdir)/m4/ftruncate.m4 \
+ $(top_srcdir)/m4/getcwd-abort-bug.m4 \
+ $(top_srcdir)/m4/getcwd-path-max.m4 $(top_srcdir)/m4/getcwd.m4 \
+ $(top_srcdir)/m4/getdate.m4 $(top_srcdir)/m4/getdelim.m4 \
+ $(top_srcdir)/m4/getline.m4 $(top_srcdir)/m4/getopt.m4 \
+ $(top_srcdir)/m4/getpagesize.m4 $(top_srcdir)/m4/gettext.m4 \
+ $(top_srcdir)/m4/gettime.m4 $(top_srcdir)/m4/gettimeofday.m4 \
+ $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/gnulib-common.m4 \
+ $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/hash.m4 \
+ $(top_srcdir)/m4/human.m4 $(top_srcdir)/m4/iconv.m4 \
+ $(top_srcdir)/m4/inline.m4 $(top_srcdir)/m4/intmax_t.m4 \
+ $(top_srcdir)/m4/inttostr.m4 $(top_srcdir)/m4/inttypes-pri.m4 \
+ $(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/inttypes_h.m4 \
+ $(top_srcdir)/m4/lchown.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+ $(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/longlong.m4 \
+ $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/mbchar.m4 \
+ $(top_srcdir)/m4/mbiter.m4 $(top_srcdir)/m4/mbrtowc.m4 \
+ $(top_srcdir)/m4/mbscasecmp.m4 $(top_srcdir)/m4/mbstate_t.m4 \
+ $(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/mempcpy.m4 \
+ $(top_srcdir)/m4/memrchr.m4 $(top_srcdir)/m4/memset.m4 \
+ $(top_srcdir)/m4/mkdtemp.m4 $(top_srcdir)/m4/mktime.m4 \
+ $(top_srcdir)/m4/modechange.m4 $(top_srcdir)/m4/nls.m4 \
+ $(top_srcdir)/m4/openat.m4 $(top_srcdir)/m4/pathmax.m4 \
+ $(top_srcdir)/m4/paxutils.m4 $(top_srcdir)/m4/po.m4 \
+ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/quote.m4 \
+ $(top_srcdir)/m4/quotearg.m4 $(top_srcdir)/m4/readlink.m4 \
+ $(top_srcdir)/m4/regex.m4 $(top_srcdir)/m4/rmdir.m4 \
+ $(top_srcdir)/m4/rmt.m4 $(top_srcdir)/m4/rpmatch.m4 \
+ $(top_srcdir)/m4/rtapelib.m4 $(top_srcdir)/m4/safe-read.m4 \
+ $(top_srcdir)/m4/safe-write.m4 $(top_srcdir)/m4/save-cwd.m4 \
+ $(top_srcdir)/m4/savedir.m4 $(top_srcdir)/m4/setenv.m4 \
+ $(top_srcdir)/m4/sleep.m4 $(top_srcdir)/m4/ssize_t.m4 \
+ $(top_srcdir)/m4/stat-time.m4 $(top_srcdir)/m4/stdarg.m4 \
+ $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stdint.m4 \
+ $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/stdio_h.m4 \
+ $(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/stpcpy.m4 \
+ $(top_srcdir)/m4/strcase.m4 $(top_srcdir)/m4/strchrnul.m4 \
+ $(top_srcdir)/m4/strdup.m4 $(top_srcdir)/m4/strerror.m4 \
+ $(top_srcdir)/m4/string_h.m4 $(top_srcdir)/m4/strndup.m4 \
+ $(top_srcdir)/m4/strnlen.m4 $(top_srcdir)/m4/strtoimax.m4 \
+ $(top_srcdir)/m4/strtol.m4 $(top_srcdir)/m4/strtoll.m4 \
+ $(top_srcdir)/m4/strtoul.m4 $(top_srcdir)/m4/strtoull.m4 \
+ $(top_srcdir)/m4/strtoumax.m4 $(top_srcdir)/m4/sys_stat_h.m4 \
+ $(top_srcdir)/m4/sys_time_h.m4 $(top_srcdir)/m4/sysexits.m4 \
+ $(top_srcdir)/m4/system.m4 $(top_srcdir)/m4/tempname.m4 \
+ $(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/time_r.m4 \
+ $(top_srcdir)/m4/timespec.m4 $(top_srcdir)/m4/tm_gmtoff.m4 \
+ $(top_srcdir)/m4/unistd-safer.m4 $(top_srcdir)/m4/unistd_h.m4 \
+ $(top_srcdir)/m4/unlinkdir.m4 $(top_srcdir)/m4/unlocked-io.m4 \
+ $(top_srcdir)/m4/utimbuf.m4 $(top_srcdir)/m4/utime.m4 \
+ $(top_srcdir)/m4/utimens.m4 $(top_srcdir)/m4/utimes-null.m4 \
+ $(top_srcdir)/m4/utimes.m4 $(top_srcdir)/m4/vasnprintf.m4 \
+ $(top_srcdir)/m4/vsnprintf.m4 $(top_srcdir)/m4/wchar.m4 \
+ $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wctype.m4 \
+ $(top_srcdir)/m4/wcwidth.m4 $(top_srcdir)/m4/wint_t.m4 \
+ $(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/m4/xgetcwd.m4 \
+ $(top_srcdir)/m4/xstrndup.m4 $(top_srcdir)/m4/xstrtol.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/build-aux/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+am__installdirs = "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(sbindir)"
+libexecSCRIPT_INSTALL = $(INSTALL_SCRIPT)
+sbinSCRIPT_INSTALL = $(INSTALL_SCRIPT)
+SCRIPTS = $(libexec_SCRIPTS) $(sbin_SCRIPTS)
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ABSOLUTE_DIRENT_H = @ABSOLUTE_DIRENT_H@
+ABSOLUTE_FCNTL_H = @ABSOLUTE_FCNTL_H@
+ABSOLUTE_FLOAT_H = @ABSOLUTE_FLOAT_H@
+ABSOLUTE_INTTYPES_H = @ABSOLUTE_INTTYPES_H@
+ABSOLUTE_STDINT_H = @ABSOLUTE_STDINT_H@
+ABSOLUTE_STDIO_H = @ABSOLUTE_STDIO_H@
+ABSOLUTE_STDLIB_H = @ABSOLUTE_STDLIB_H@
+ABSOLUTE_STRING_H = @ABSOLUTE_STRING_H@
+ABSOLUTE_SYSEXITS_H = @ABSOLUTE_SYSEXITS_H@
+ABSOLUTE_SYS_STAT_H = @ABSOLUTE_SYS_STAT_H@
+ABSOLUTE_SYS_TIME_H = @ABSOLUTE_SYS_TIME_H@
+ABSOLUTE_TIME_H = @ABSOLUTE_TIME_H@
+ABSOLUTE_UNISTD_H = @ABSOLUTE_UNISTD_H@
+ABSOLUTE_WCHAR_H = @ABSOLUTE_WCHAR_H@
+ABSOLUTE_WCTYPE_H = @ABSOLUTE_WCTYPE_H@
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+ALLOCA_H = @ALLOCA_H@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOM4TE = @AUTOM4TE@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BACKUP_LIBEXEC_SCRIPTS = @BACKUP_LIBEXEC_SCRIPTS@
+BACKUP_SBIN_SCRIPTS = @BACKUP_SBIN_SCRIPTS@
+BACKUP_SED_COND = @BACKUP_SED_COND@
+BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@
+BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@
+BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@
+BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@
+BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFAULT_ARCHIVE = @DEFAULT_ARCHIVE@
+DEFAULT_ARCHIVE_FORMAT = @DEFAULT_ARCHIVE_FORMAT@
+DEFAULT_BLOCKING = @DEFAULT_BLOCKING@
+DEFAULT_QUOTING_STYLE = @DEFAULT_QUOTING_STYLE@
+DEFAULT_RMT_COMMAND = @DEFAULT_RMT_COMMAND@
+DEFAULT_RMT_DIR = @DEFAULT_RMT_DIR@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DIRENT_H = @DIRENT_H@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EOVERFLOW = @EOVERFLOW@
+EXEEXT = @EXEEXT@
+FCNTL_H = @FCNTL_H@
+FLOAT_H = @FLOAT_H@
+FNMATCH_H = @FNMATCH_H@
+GETOPT_H = @GETOPT_H@
+GLIBC21 = @GLIBC21@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GNULIB_CHOWN = @GNULIB_CHOWN@
+GNULIB_DUP2 = @GNULIB_DUP2@
+GNULIB_FCHDIR = @GNULIB_FCHDIR@
+GNULIB_FFLUSH = @GNULIB_FFLUSH@
+GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@
+GNULIB_FSEEK = @GNULIB_FSEEK@
+GNULIB_FSEEKO = @GNULIB_FSEEKO@
+GNULIB_FTELL = @GNULIB_FTELL@
+GNULIB_FTELLO = @GNULIB_FTELLO@
+GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
+GNULIB_GETCWD = @GNULIB_GETCWD@
+GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
+GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
+GNULIB_IMAXABS = @GNULIB_IMAXABS@
+GNULIB_IMAXDIV = @GNULIB_IMAXDIV@
+GNULIB_LSEEK = @GNULIB_LSEEK@
+GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@
+GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@
+GNULIB_MBSCHR = @GNULIB_MBSCHR@
+GNULIB_MBSCSPN = @GNULIB_MBSCSPN@
+GNULIB_MBSLEN = @GNULIB_MBSLEN@
+GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@
+GNULIB_MBSPBRK = @GNULIB_MBSPBRK@
+GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@
+GNULIB_MBSRCHR = @GNULIB_MBSRCHR@
+GNULIB_MBSSEP = @GNULIB_MBSSEP@
+GNULIB_MBSSPN = @GNULIB_MBSSPN@
+GNULIB_MBSSTR = @GNULIB_MBSSTR@
+GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@
+GNULIB_MEMMEM = @GNULIB_MEMMEM@
+GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
+GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
+GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
+GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
+GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
+GNULIB_READLINK = @GNULIB_READLINK@
+GNULIB_SLEEP = @GNULIB_SLEEP@
+GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
+GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
+GNULIB_STPCPY = @GNULIB_STPCPY@
+GNULIB_STPNCPY = @GNULIB_STPNCPY@
+GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
+GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
+GNULIB_STRDUP = @GNULIB_STRDUP@
+GNULIB_STRNDUP = @GNULIB_STRNDUP@
+GNULIB_STRNLEN = @GNULIB_STRNLEN@
+GNULIB_STRPBRK = @GNULIB_STRPBRK@
+GNULIB_STRSEP = @GNULIB_STRSEP@
+GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@
+GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
+GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@
+GNULIB_VASPRINTF = @GNULIB_VASPRINTF@
+GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@
+GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
+GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@
+GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@
+GREP = @GREP@
+HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
+HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@
+HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@
+HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
+HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
+HAVE_DECL_MKDIR = @HAVE_DECL_MKDIR@
+HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@
+HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@
+HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@
+HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@
+HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@
+HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@
+HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@
+HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@
+HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@
+HAVE_DUP2 = @HAVE_DUP2@
+HAVE_FSEEKO = @HAVE_FSEEKO@
+HAVE_FTELLO = @HAVE_FTELLO@
+HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
+HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
+HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
+HAVE_IO_H = @HAVE_IO_H@
+HAVE_ISWCNTRL = @HAVE_ISWCNTRL@
+HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
+HAVE_LSTAT = @HAVE_LSTAT@
+HAVE_MEMPCPY = @HAVE_MEMPCPY@
+HAVE_MKDTEMP = @HAVE_MKDTEMP@
+HAVE_READLINK = @HAVE_READLINK@
+HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
+HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@
+HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@
+HAVE_SLEEP = @HAVE_SLEEP@
+HAVE_STDINT_H = @HAVE_STDINT_H@
+HAVE_STPCPY = @HAVE_STPCPY@
+HAVE_STPNCPY = @HAVE_STPNCPY@
+HAVE_STRCASECMP = @HAVE_STRCASECMP@
+HAVE_STRCASESTR = @HAVE_STRCASESTR@
+HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
+HAVE_STRNDUP = @HAVE_STRNDUP@
+HAVE_STRPBRK = @HAVE_STRPBRK@
+HAVE_STRSEP = @HAVE_STRSEP@
+HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@
+HAVE_SYSEXITS_H = @HAVE_SYSEXITS_H@
+HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@
+HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@
+HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
+HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
+HAVE_UNISTD_H = @HAVE_UNISTD_H@
+HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@
+HAVE_VASPRINTF = @HAVE_VASPRINTF@
+HAVE_WCTYPE_H = @HAVE_WCTYPE_H@
+HAVE_WINT_T = @HAVE_WINT_T@
+HAVE__BOOL = @HAVE__BOOL@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+INTTYPES_H = @INTTYPES_H@
+LDFLAGS = @LDFLAGS@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTAR_LIBDEPS = @LIBTAR_LIBDEPS@
+LIBTAR_LTLIBDEPS = @LIBTAR_LTLIBDEPS@
+LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
+LIB_SETSOCKOPT = @LIB_SETSOCKOPT@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MSGFMT = @MSGFMT@
+MSGFMT_015 = @MSGFMT_015@
+MSGMERGE = @MSGMERGE@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+POSUB = @POSUB@
+PRIPTR_PREFIX = @PRIPTR_PREFIX@
+PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@
+PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
+PU_RMT_PROG = @PU_RMT_PROG@
+RANLIB = @RANLIB@
+REPLACE_CHOWN = @REPLACE_CHOWN@
+REPLACE_FCHDIR = @REPLACE_FCHDIR@
+REPLACE_FFLUSH = @REPLACE_FFLUSH@
+REPLACE_FPRINTF = @REPLACE_FPRINTF@
+REPLACE_FSEEK = @REPLACE_FSEEK@
+REPLACE_FSEEKO = @REPLACE_FSEEKO@
+REPLACE_FTELL = @REPLACE_FTELL@
+REPLACE_FTELLO = @REPLACE_FTELLO@
+REPLACE_GETCWD = @REPLACE_GETCWD@
+REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
+REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@
+REPLACE_LSEEK = @REPLACE_LSEEK@
+REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
+REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@
+REPLACE_PRINTF = @REPLACE_PRINTF@
+REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
+REPLACE_SPRINTF = @REPLACE_SPRINTF@
+REPLACE_STRPTIME = @REPLACE_STRPTIME@
+REPLACE_TIMEGM = @REPLACE_TIMEGM@
+REPLACE_VASPRINTF = @REPLACE_VASPRINTF@
+REPLACE_VFPRINTF = @REPLACE_VFPRINTF@
+REPLACE_VPRINTF = @REPLACE_VPRINTF@
+REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@
+REPLACE_VSPRINTF = @REPLACE_VSPRINTF@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
+SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
+STDBOOL_H = @STDBOOL_H@
+STDINT_H = @STDINT_H@
+STRIP = @STRIP@
+SYSEXITS_H = @SYSEXITS_H@
+SYS_STAT_H = @SYS_STAT_H@
+SYS_TIME_H = @SYS_TIME_H@
+SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
+TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+WCHAR_H = @WCHAR_H@
+WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
+WCTYPE_H = @WCTYPE_H@
+WINT_T_SUFFIX = @WINT_T_SUFFIX@
+XGETTEXT = @XGETTEXT@
+XGETTEXT_015 = @XGETTEXT_015@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+gl_LIBOBJS = @gl_LIBOBJS@
+gl_LTLIBOBJS = @gl_LTLIBOBJS@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+BACKUP_LIBEXEC_SCRIPTS_LIST = backup.sh dump-remind
+BACKUP_SBIN_SCRIPTS_LIST = backup restore
+libexec_SCRIPTS = @BACKUP_LIBEXEC_SCRIPTS@
+AM_INSTALLCHECK_STD_OPTIONS_EXEMPT = backup.sh dump-remind
+sbin_SCRIPTS = @BACKUP_SBIN_SCRIPTS@
+EXTRA_SCRIPTS = tarcat
+EXTRA_DIST = \
+ backup.sh.in\
+ backup.in\
+ restore.in\
+ dump-remind.in\
+ backup-specs
+
+CLEANFILES = backup.sh backup restore dump-remind
+SED_CMD = "s,\@libexecdir\@,$(libexecdir),;\
+ s,\@sysconfdir\@,$(sysconfdir),;\
+ s,\@PACKAGE_NAME\@,$(PACKAGE_NAME),;\
+ s,\@VERSION\@,$(VERSION),;\
+ s,\@PACKAGE_BUGREPORT\@,$(PACKAGE_BUGREPORT),;\
+ s,\@DATE_FORMAT_OK\@,$(DATE_FORMAT_OK),;@BACKUP_SED_COND@"
+
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits scripts/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnits scripts/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-libexecSCRIPTS: $(libexec_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ test -z "$(libexecdir)" || $(MKDIR_P) "$(DESTDIR)$(libexecdir)"
+ @list='$(libexec_SCRIPTS)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f $$d$$p; then \
+ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
+ echo " $(libexecSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(libexecdir)/$$f'"; \
+ $(libexecSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(libexecdir)/$$f"; \
+ else :; fi; \
+ done
+
+uninstall-libexecSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(libexec_SCRIPTS)'; for p in $$list; do \
+ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
+ echo " rm -f '$(DESTDIR)$(libexecdir)/$$f'"; \
+ rm -f "$(DESTDIR)$(libexecdir)/$$f"; \
+ done
+
+installcheck-libexecSCRIPTS: $(libexec_SCRIPTS)
+ bad=0; pid=$$$$; list="$(libexec_SCRIPTS)"; for p in $$list; do \
+ case ' $(AM_INSTALLCHECK_STD_OPTIONS_EXEMPT) ' in \
+ *" $$p "* | *" $(srcdir)/$$p "*) continue;; \
+ esac; \
+ f=`echo "$$p" | sed 's,^.*/,,;$(transform)'`; \
+ for opt in --help --version; do \
+ if "$(DESTDIR)$(libexecdir)/$$f" $$opt >c$${pid}_.out \
+ 2>c$${pid}_.err </dev/null \
+ && test -n "`cat c$${pid}_.out`" \
+ && test -z "`cat c$${pid}_.err`"; then :; \
+ else echo "$$f does not support $$opt" 1>&2; bad=1; fi; \
+ done; \
+ done; rm -f c$${pid}_.???; exit $$bad
+install-sbinSCRIPTS: $(sbin_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
+ @list='$(sbin_SCRIPTS)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f $$d$$p; then \
+ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
+ echo " $(sbinSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(sbindir)/$$f'"; \
+ $(sbinSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(sbindir)/$$f"; \
+ else :; fi; \
+ done
+
+uninstall-sbinSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(sbin_SCRIPTS)'; for p in $$list; do \
+ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
+ echo " rm -f '$(DESTDIR)$(sbindir)/$$f'"; \
+ rm -f "$(DESTDIR)$(sbindir)/$$f"; \
+ done
+
+installcheck-sbinSCRIPTS: $(sbin_SCRIPTS)
+ bad=0; pid=$$$$; list="$(sbin_SCRIPTS)"; for p in $$list; do \
+ case ' $(AM_INSTALLCHECK_STD_OPTIONS_EXEMPT) ' in \
+ *" $$p "* | *" $(srcdir)/$$p "*) continue;; \
+ esac; \
+ f=`echo "$$p" | sed 's,^.*/,,;$(transform)'`; \
+ for opt in --help --version; do \
+ if "$(DESTDIR)$(sbindir)/$$f" $$opt >c$${pid}_.out \
+ 2>c$${pid}_.err </dev/null \
+ && test -n "`cat c$${pid}_.out`" \
+ && test -z "`cat c$${pid}_.err`"; then :; \
+ else echo "$$f does not support $$opt" 1>&2; bad=1; fi; \
+ done; \
+ done; rm -f c$${pid}_.???; exit $$bad
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(SCRIPTS)
+installdirs:
+ for dir in "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(sbindir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-exec-am: install-libexecSCRIPTS install-sbinSCRIPTS
+
+install-html: install-html-am
+
+install-info: install-info-am
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
+installcheck-am: installcheck-libexecSCRIPTS installcheck-sbinSCRIPTS
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-libexecSCRIPTS uninstall-sbinSCRIPTS
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic distclean \
+ distclean-generic distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am \
+ install-libexecSCRIPTS install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-sbinSCRIPTS install-strip \
+ installcheck installcheck-am installcheck-libexecSCRIPTS \
+ installcheck-sbinSCRIPTS installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+ pdf-am ps ps-am uninstall uninstall-am \
+ uninstall-libexecSCRIPTS uninstall-sbinSCRIPTS
+
+
+backup.sh: $(srcdir)/backup.sh.in
+ sed $(SED_CMD) $? > $@
+
+backup: $(srcdir)/backup.in
+ sed $(SED_CMD) $? > $@
+
+restore: $(srcdir)/restore.in
+ sed $(SED_CMD) $? > $@
+
+dump-remind: $(srcdir)/dump-remind.in
+ sed $(SED_CMD) $? > $@
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/scripts/backup-specs b/scripts/backup-specs
new file mode 100644
index 0000000..95ef316
--- /dev/null
+++ b/scripts/backup-specs
@@ -0,0 +1,100 @@
+# This is a sample configuration file for GNU tar backup script.
+# See end of file for copying conditions
+
+# User name or email address of the administrator of backups. A report
+# will be sent to this address when the backup terminates
+ADMINISTRATOR="root@localhost"
+
+# (Optional) Path to tar binary.
+TAR=/bin/tar
+
+# (Optional) Path to rsh binary or its equivalent. You may wish to
+# set it to ssh as shown in the example below, to improve security.
+# In this case you will have to use public key authentication.
+RSH=/usr/local/bin/ssh
+
+# (Optional) Path to rsh binary on remote mashines. This will be
+# passed via --rsh-command option to the remote invocation of
+# tar
+RSH_COMMAND=/usr/local/bin/ssh
+
+# Name of temporary file to hold volume numbers. This needs to be accessible
+# by all the machines which have filesystems to be dumped.
+VOLNO_FILE=/root/volume
+
+# Device to use for dumping. It should be on the host
+# on which the dump scripts are run.
+TAPE_FILE=/dev/rmt0
+
+# Blocking factor to use for writing the dump.
+BLOCKING=124
+
+# List of file systems to be dumped. If prefixed with a HOST:
+# the filesystem is accessed on the given HOST, unless it
+# coincides with the local machine name.
+# If a file system starts with a slash, it is handled as a local
+# one.
+BACKUP_DIRS='remote1:/etc remote1:/var/spool/crontab'
+# Alternatively, you may leave this variable unassigned, and
+# keep the list of filesystems to be dumped in file
+# $SYSCONFDIR/backup/dirs, one filesystem per line. Empty
+# lines and shell comments are allowed in this file. The location
+# of this file may be overridden using DIRLIST variable, e.g.:
+# DIRLIST=/etc/my-backup/dirlist
+
+# List of individual files to be dumped.
+# These should be accesible from the machine on which the dump is run.
+BACKUP_FILES=''
+# This list may also be kept in file $SYSCONFDIR/backup/files, the
+# format of which is the same as described above. The location of
+# this file may be overridden by setting FILELIST variable:
+# FILELIST=/etc/my-backup/filelist
+
+# Name of 'exclude file list'. It is searched under $SYSCONFDIR/tar-backup
+# on remote machines
+XLIST=exclude_files
+
+# Default directory for storing incremental listings on remote
+# machines is $SYSCONFDIR/tar-backup. It can be overridden using
+# REMOTEBACKUPDIR variable
+
+# Default directory for storing backup logs is $SYSCONFDIR/backup/log.
+# It can also be overridden via LOGPATH variable.
+
+# Time to sleep between dumps of any two successive filesystems
+SLEEP_TIME=15
+
+# Script to be run when it's time to insert a new tape in for the next
+# volume. Administrators may want to tailor this script for their site.
+# If this variable isn't set, tar will use some default behavior which is
+# probably defined in the manual.
+#DUMP_REMIND_SCRIPT='rsh apple-gunkies /home/gd2/dump/dump-remind'
+
+# Message to display on the terminal while waiting for dump time. Usually
+# this will just be some literal text, preferably something more
+# entertaining than this. The awk script here saves some redundant
+# repetition, but is not really all that desirable.
+SLEEP_MESSAGE="`awk '
+ BEGIN {
+ for (i = 0; i < 30; i++)
+ print \" \" \
+ \"D O N O T T O U C H T H I S T E R M I N A L !!!!!\"
+ }' /dev/null`"
+
+
+# Copyright (C) 2004 Free Software Foundation, Inc.
+
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2, or (at your option)
+## any later version.
+
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+## 02110-1301, USA.
diff --git a/scripts/backup.in b/scripts/backup.in
new file mode 100644
index 0000000..6a50e51
--- /dev/null
+++ b/scripts/backup.in
@@ -0,0 +1,253 @@
+#! /bin/sh
+# This program is part of GNU tar
+# Copyright (C) 2004, 2005, 2006 Free Software Foundation
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 1, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
+# Load library routines
+SYSCONFDIR=${SYSCONFDIR-@sysconfdir@}
+. ${LIBDIR-@libexecdir@}/backup.sh
+
+DUMP_LEVEL=0
+TIME=
+NOW=`now`
+
+usage() {
+ cat - <<EOF
+usage: $PROGNAME [OPTIONS] [WHEN]
+Options are:
+
+ -l, --level=LEVEL Do backup level LEVEL (default $DUMP_LEVEL).
+ -f, --force Force backup even if today's log file already
+ exists.
+ -v, --verbose[=LEVEL] Set verbosity level. Default 100.
+ -t, --time=TIME Wait till TIME, then do backup.
+
+Informational options:
+ -h, --help Display this help message.
+ -V, --version Display program version.
+
+ Optional argument WHEN is for backward compatibility only. It has been
+ superseded by --time option.
+ TIME argument can be one of:
+
+ now -- do backup immediately.
+ HH -- do backup at HH hours.
+ HH:MM -- do backup at HH:MM.
+
+Send bug reports to @PACKAGE_BUGREPORT@.
+EOF
+}
+
+# For compatibility with previous versions, deduce the backup level
+# from the command name
+case "$PROGNAME" in
+level-[0-9]) DUMP_LEVEL=`expr $PROGNAME : 'level-\([0-9][0-9]*\)'`;;
+esac
+
+for opt
+do
+ if [ -z "$prev" ]; then
+ option=$opt
+ optarg=`expr "x$opt" : 'x[^=]*=\(.*\)'`
+ else
+ option="${prev}=$opt"
+ prev=""
+ optarg=$opt
+ fi
+ case $option in
+ --l=*|--le=*|--lev=*|--leve=*|--level=*)
+ DUMP_LEVEL=$optarg
+ ;;
+ -l|--l|--le|--lev|--leve|--level)
+ prev=$option
+ ;;
+ --verb=*|--verbo=*|--verbos=*|--verbose=*)
+ VERBOSE=$optarg
+ ;;
+ -v|--verb|--verbo|--verbos|--verbose)
+ VERBOSE=100
+ ;;
+ -v*) VERBOSE=`expr $option : "-v\(.*\)"`;;
+ --t=*|--ti=*|--tim=*|--time=*)
+ TIME=$optarg
+ ;;
+ -t) prev=--t;;
+ -t*) TIME=`expr $option : "-t\(.*\)"`;;
+ --t|--ti|--tim|--time)
+ prev=$option
+ ;;
+ -V|--v|--ve|--ver|--vers|--versi|--versio|--version)
+ echo "backup (@PACKAGE_NAME@) @VERSION@"
+ license
+ exit;;
+ -h|--h|--he|--hel|--help)
+ usage
+ exit;;
+ -f|--f|--fo|--for|--forc|--force)
+ FORCE=yes
+ ;;
+ *) if [ "x$TIME" != "x" ]; then
+ bailout "Extra argument. Try $PROGNAME --help for more info."
+ else
+ TIME=$option
+ fi;;
+ esac
+done
+
+if [ "x$TIME" = x ]; then
+ bailout "No backup time specified. Try $PROGNAME --help for more info."
+ exit 1
+fi
+
+init_backup
+
+# Maybe sleep until around specified or default hour.
+wait_time $TIME
+
+if [ $DUMP_LEVEL -ne 0 ]; then
+ PREV_LEVEL=`expr $DUMP_LEVEL - 1`
+ PREV_DATE=`ls -t ${LOGPATH}/log-*-level-$PREV_LEVEL|
+ head -n 1|
+ sed "s,${LOGPATH}/log-\(.*\)-level.*,\1,"`
+ if [ "x$PREV_DATE" = x ]; then
+ bailout "Can't determine date of the previous backup"
+ fi
+ message 0 "Backup from $PREV_DATE to $NOW"
+fi
+
+# start doing things
+
+# Make sure the log file did not already exist. Create it.
+
+if [ "x$FORCE" = "xyes" ]; then
+ rm ${LOGFILE}
+fi
+
+if [ -f "${LOGFILE}" ] ; then
+ bailout "Log file ${LOGFILE} already exists."
+else
+ touch "${LOGFILE}"
+fi
+message 1 "Ready for backup."
+message 10 "TAR invocation: $TAR_PART1"
+message 20 "Variables:"
+message 20 "BACKUP_DIRS=$BACKUP_DIRS"
+message 20 "BACKUP_FILES=$BACKUP_FILES"
+
+# The buch of commands below is run in a subshell for which all output is
+# piped through `tee' to the logfile. Doing this, instead of having
+# multiple pipelines all over the place, is cleaner and allows access to
+# the exit value from various commands more easily.
+(
+ message 1 "preparing tapes"
+ $MT_BEGIN "${TAPE_FILE}"
+ rm -f "${VOLNO_FILE}"
+
+ message 1 "processing backup directories"
+
+ set - ${BACKUP_DIRS}
+ while [ $# -ne 0 ] ; do
+ date="`date`"
+ fs="`echo \"${1}\" | sed -e 's/^.*://'`"
+ fs=`root_fs $fs`
+ fsname="`echo \"${1}\" | sed -e 's/\//:/g'`"
+ remotehost="`expr \"${1}\" : '\([^/][^/]*\):.*'`"
+ if [ -z "$remotehost" ]; then
+ remotehost=$localhost
+ fi
+
+ echo "Backing up ${1} at ${date}"
+ message 10 "fs=$fs"
+ message 10 "fsname=$fsname"
+ message 10 "remotehost=$remotehost"
+ if [ $DUMP_LEVEL -eq 0 ]; then
+ make_level_log ${remotehost}
+ else
+ echo "Last `prev_level` dump on this filesystem was on $PREV_DATE"
+ remote_run "${remotehost}" cp "`level_log_name ${fsname} $PREV_LEVEL`" "`level_log_name temp`"
+ fi
+
+ ${DUMP_BEGIN-:} $DUMP_LEVEL $remotehost $fs $fsname
+ backup_host ${remotehost} \
+ "--listed=`level_log_name temp`" \
+ "--label='`print_level` backup of ${fs} on ${remotehost} at ${NOW}'" \
+ -C ${fs} .
+
+ # `rsh' doesn't exit with the exit status of the remote command. What
+ # stupid lossage. TODO: think of a reliable workaround.
+ if [ $? -ne 0 ] ; then
+ echo "Backup of ${1} failed." 1>&2
+ # I'm assuming that the tar will have written an empty
+ # file to the tape, otherwise I should do a cat here.
+ else
+ flush_level_log ${remotehost} ${fsname}
+ fi
+ ${MT_STATUS} "$TAPE_FILE"
+ ${DUMP_END-:} $DUMP_LEVEL $remotehost $fs $fsname
+ echo "sleeping ${SLEEP_TIME} seconds"
+ sleep ${SLEEP_TIME}
+ shift
+ done
+
+ # Dump any individual files requested.
+
+ if [ "x${BACKUP_FILES}" != "x" ] ; then
+ message 1 "processing individual files"
+
+ date="`date`"
+
+ if [ $DUMP_LEVEL -eq 0 ]; then
+ make_level_log $localhost
+ else
+ echo "Last `prev_level` dump on this filesystem was on $PREV_DATE"
+ remote_run "${localhost}" cp "`level_log_name MISC $PREV_LEVEL`" "`level_log_name temp`"
+ fi
+
+ echo "Backing up miscellaneous files at ${date}"
+
+ ${DUMP_BEGIN-:} $DUMP_LEVEL $localhost MISC MISC
+ backup_host $localhost \
+ "--listed=`level_log_name temp`"\
+ "--label='`print_level` backup of miscellaneous files at ${NOW}'" \
+ ${BACKUP_FILES}
+
+ if [ $? -ne 0 ] ; then
+ echo "Backup of miscellaneous files failed."
+ # I'm assuming that the tar will have written an empty
+ # file to the tape, otherwise I should do a cat here.
+ else
+ flush_level_log $localhost MISC
+ fi
+ ${MT_STATUS} "$TAPE_FILE"
+ ${DUMP_END-:} $DUMP_LEVEL $localhost MISC MISC
+ else
+ echo "No miscellaneous files specified"
+ fi
+
+ message 1 "final cleanup"
+
+ $MT_REWIND "${TAPE_FILE}"
+ $MT_OFFLINE "${TAPE_FILE}"
+ echo "."
+) 2>&1 | tee -a "${LOGFILE}"
+
+if test "${ADMINISTRATOR}" != NONE; then
+ echo "Sending the dump log to ${ADMINISTRATOR}"
+ mail -s "Results of backup started ${startdate}" ${ADMINISTRATOR} < "${LOGFILE}"
+fi
+
+# EOF
diff --git a/scripts/backup.sh.in b/scripts/backup.sh.in
new file mode 100644
index 0000000..adcdfe2
--- /dev/null
+++ b/scripts/backup.sh.in
@@ -0,0 +1,347 @@
+#! /bin/sh
+# This program is part of GNU tar
+# Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 1, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
+PROGNAME=`basename $0`
+CONFIGPATH="$SYSCONFDIR/backup"
+REMOTEBACKUPDIR="$SYSCONFDIR/tar-backup"
+CONFIGFILE=${CONFIGPATH}/backup-specs
+DIRLIST=${CONFIGPATH}/dirs
+FILELIST=${CONFIGPATH}/files
+LOGPATH=${CONFIGPATH}/log
+
+# Default functions for running various magnetic tape commands
+mt_begin() {
+ $MT -f "$1" retension
+}
+
+mt_rewind() {
+ $MT -f "$1" rewind
+}
+
+mt_offline() {
+ $MT -f "$1" offl
+}
+
+mt_status() {
+ $MT -f "$1" status
+}
+
+# The main configuration file may override any of these variables
+MT_BEGIN=mt_begin
+MT_REWIND=mt_rewind
+MT_OFFLINE=mt_offline
+MT_STATUS=mt_status
+
+# Insure `mail' is in PATH.
+PATH="/usr/ucb:${PATH}"
+export PATH
+# Put startdate in the subject line of mailed report, since if it happens
+# to run longer than 24 hours (as may be the case if someone forgets to put
+# in the next volume of the tape in adequate time), the backup date won't
+# appear too misleading.
+startdate="`date`"
+here="`pwd`"
+# Save local hostname
+localhost="`hostname | sed -e 's/\..*//' | tr A-Z a-z`"
+
+# Produce a diagnostic output
+message() {
+ if [ "$VERBOSE" != "" ]; then
+ if [ $VERBOSE -ge $1 ]; then
+ shift
+ echo "$@" >&2
+ fi
+ fi
+}
+
+# Bail out and exit.
+bailout() {
+ echo "$PROGNAME: $*" >&2
+ exit 1
+}
+
+# Return current date
+now() {
+#IF_DATE_FORMAT_OK
+ date +%Y-%m-%d
+#ELSE_DATE_FORMAT_OK
+ LC_ALL=C date | \
+ sed 's/[^ ]* *\([^ ]*\) *\([^ ]*\).* \([^ ]*\)$/\3-\1-\2/
+ /-[0-9]$/s/\([0-9]\)$/0\1/
+ /Jan/{s/Jan/01/p;q;}
+ /Feb/{s/Feb/02/p;q;}
+ /Mar/{s/Mar/03/p;q;}
+ /Apr/{s/Apr/04/p;q;}
+ /May/{s/May/05/p;q;}
+ /Jun/{s/Jun/06/p;q;}
+ /Jul/{s/Jul/07/p;q;}
+ /Aug/{s/Aug/08/p;q;}
+ /Sep/{s/Sep/09/p;q;}
+ /Oct/{s/Oct/10/p;q;}
+ /Nov/{s/Nov/11/p;q;}
+ /Dec/{s/Dec/12/p;q;}'
+#ENDIF_DATE_FORMAT_OK
+}
+
+# Bail out if we don't have root privileges.
+test_root() {
+ if [ ! -w ${ROOT_FS-/} ]; then
+ bailout "The backup must be run as root or else some files will fail to be dumped."
+ fi
+}
+
+root_fs() {
+ echo "${ROOT_FS}$1" | tr -s /
+}
+
+advice() {
+ echo "Directory $1 is not found." >&2
+ cat >&2 <<EOF
+The following directories and files are needed for the backup to function:
+
+1. Directory with configuration files and file lists:
+$CONFIGPATH
+2. Directory for backup log files
+$LOGPATH
+3. Main configuration file
+$CONFIGFILE
+
+Please, create these and invoke the script again.
+EOF
+}
+
+init_common() {
+ # Check if the necessary directories exist
+ if [ ! -d $CONFIGPATH ]; then
+ advice $CONFIGPATH
+ exit 1
+ fi
+ if [ ! -d $LOGPATH ]; then
+ if mkdir $LOGPATH; then
+ :
+ else
+ advice $LOGPATH
+ exit 1
+ fi
+ fi
+ # Get the values of BACKUP_DIRS, BACKUP_FILES, and other variables.
+ if [ ! -r $CONFIGFILE ]; then
+ echo "$PROGNAME: cannot read $CONFIGFILE. Stop." >&2
+ exit 1
+ fi
+ . $CONFIGFILE
+
+ # Environment sanity check
+
+ test_root
+
+ if [ x"${ADMINISTRATOR}" = x ]; then
+ bailout "ADMINISTRATOR not defined"
+ fi
+
+ [ x"$TAR" = x ] && TAR=tar
+ [ x"$SLEEP_TIME" = x ] && SLEEP_TIME=60
+
+ if [ x$VOLNO_FILE = x ]; then
+ bailout "VOLNO_FILE not specified"
+ fi
+
+ if [ -r $DIRLIST ]; then
+ BACKUP_DIRS="$BACKUP_DIRS `cat $DIRLIST`"
+ fi
+ if [ -r $FILELIST ]; then
+ BACKUP_FILES="$BACKUP_FILES `cat $FILELIST`"
+ fi
+
+ if [ \( x"$BACKUP_DIRS" = x \) -a \( x"$BACKUP_FILES" = x \) ]; then
+ bailout "Neither BACKUP_DIRS nor BACKUP_FILES specified"
+ fi
+ if [ -z "$RSH" ]; then
+ RSH=rsh
+ MT_RSH_OPTION=
+ else
+ MT_RSH_OPTION="--rsh-command=$RSH"
+ fi
+ if [ -z "$TAPE_FILE" ]; then
+ TAPE_FILE=/dev/tape
+ fi
+
+ # If TAPE_FILE is a remote device, update mt invocation accordingly
+ : ${MT:=mt}
+ case $TAPE_FILE in
+ *:*) MT="$MT $MT_RSH_OPTION";;
+ *) ;;
+ esac
+
+ POSIXLY_CORRECT=1
+ export POSIXLY_CORRECT
+}
+
+init_backup() {
+ init_common
+ TAR_PART1="${TAR} -c --format=gnu --multi-volume --one-file-system --sparse --volno-file=${VOLNO_FILE}"
+ if [ "x$XLIST" != x ]; then
+ TAR_PART1="${TAR_PART1} \`test -r $REMOTEBACKUPDIR/$XLIST && echo \"--exclude-from $REMOTEBACKUPDIR/$XLIST\"\`"
+ fi
+ if [ "$RSH_COMMAND" != "" ]; then
+ TAR_PART1="${TAR_PART1} --rsh-command=$RSH_COMMAND"
+ fi
+ if [ x$BLOCKING != x ]; then
+ TAR_PART1="${TAR_PART1} --blocking=${BLOCKING}"
+ fi
+
+ # Only use --info-script if DUMP_REMIND_SCRIPT was defined in backup-specs
+ if [ "x${DUMP_REMIND_SCRIPT}" != "x" ]; then
+ TAR_PART1="${TAR_PART1} --info-script='${DUMP_REMIND_SCRIPT}'"
+ fi
+ # Set logfile name
+ # Logfile name should be in the form ``log-1993-03-18-level-0''
+ # They go in the directory `@sysconfdir@/log'.
+ # i.e. year-month-date. This format is useful for sorting by name, since
+ # logfiles are intentionally kept online for future reference.
+ LOGFILE="${LOGPATH}/log-`now`-level-${DUMP_LEVEL}"
+}
+
+init_restore() {
+ init_common
+ # FIXME: Replace --list with --extract
+ TAR_PART1="${TAR} --extract --multi-volume"
+ if [ "$RSH_COMMAND" != "" ]; then
+ TAR_PART1="${TAR_PART1} --rsh-command=$RSH_COMMAND"
+ fi
+ if [ x$BLOCKING != x ]; then
+ TAR_PART1="${TAR_PART1} --blocking=${BLOCKING}"
+ fi
+
+ # Only use --info-script if DUMP_REMIND_SCRIPT was defined in backup-specs
+ if [ "x${DUMP_REMIND_SCRIPT}" != "x" ]; then
+ TAR_PART1="${TAR_PART1} --info-script='${DUMP_REMIND_SCRIPT}'"
+ fi
+ LOGFILE="${LOGPATH}/restore-`now`"
+}
+
+wait_time() {
+ if [ "${1}" != "now" ]; then
+ if [ "${1}x" != "x" ]; then
+ spec="${1}"
+ else
+ spec="${BACKUP_HOUR}"
+ fi
+
+ pausetime="`date | awk -v spec=\"${spec}\" '
+ BEGIN {
+ split(spec, time, ":")
+ }
+ {
+ split($4, now, ":")
+ diff = 3600 * (time[1] - now[1]) + 60 * (time[2] - now[2]);
+ if (diff < 0)
+ diff += 3600 * 24
+ print diff
+ }'`"
+ clear
+ echo "${SLEEP_MESSAGE}"
+ sleep "${pausetime}"
+ fi
+}
+
+level_log_name() {
+ echo "$REMOTEBACKUPDIR/${1}.level-${2-$DUMP_LEVEL}"
+}
+
+# Prepare a temporary level logfile
+# usage: make_level_log HOSTNAME
+make_level_log() {
+ if [ "z${localhost}" != "z$1" ] ; then
+ $RSH "$1" mkdir $REMOTEBACKUPDIR > /dev/null 2>&1
+ $RSH "$1" rm -f `level_log_name temp`
+ else
+ mkdir $REMOTEBACKUPDIR > /dev/null 2>&1
+ rm -f `level_log_name temp`
+ fi
+}
+
+# Rename temporary log
+# usage: flush_level_log HOSTNAME FSNAME
+flush_level_log() {
+ message 10 "RENAME: `level_log_name temp` --> `level_log_name $2`"
+ if [ "z${localhost}" != "z$1" ] ; then
+ $RSH "$1" mv -f `level_log_name temp` "`level_log_name $2`"
+ else
+ mv -f `level_log_name temp` "`level_log_name $2`"
+ fi
+}
+
+# Return the timestamp of the last backup.
+# usage: get_dump_time LEVEL
+get_dump_time() {
+ ls -r ${LOGPATH}/log-*-level-$1 \
+ | head -n 1 \
+ | sed "s,.*log-\(.*\)-level-$1,\1,"
+}
+
+# Do actual backup on a host
+# usage: backup_host HOSTNAME [TAR_ARGUMENTS]
+backup_host() {
+ message 10 "ARGS: $@"
+ rhost=$1
+ shift
+ if [ "z${localhost}" != "z$rhost" ] ; then
+ $RSH "$rhost" ${TAR_PART1} -f "${localhost}:${TAPE_FILE}" $@
+ else
+ # Using `sh -c exec' causes nested quoting and shell substitution
+ # to be handled here in the same way rsh handles it.
+ CMD="exec ${TAR_PART1} -f \"${TAPE_FILE}\" $@"
+ message 10 "CMD: $CMD"
+ sh -c "$CMD"
+ message 10 "RC: $?"
+ fi
+}
+
+print_level() {
+ if [ ${1-$DUMP_LEVEL} -eq 0 ]; then
+ echo "Full"
+ else
+ echo "Level ${1-$DUMP_LEVEL}"
+ fi
+}
+
+prev_level() {
+ print_level `expr $DUMP_LEVEL - 1` | tr A-Z a-z
+}
+
+remote_run() {
+ rhost=$1
+ shift
+ message 10 "REMOTE $rhost: $@"
+ if [ "x$rhost" != "x${localhost}" ] ; then
+ $RSH "${rhost}" "$@"
+ else
+ $*
+ fi
+}
+
+license() {
+ cat - <<EOF
+Copyright (C) 2006 Free Software Foundation, Inc.
+This is free software. You may redistribute copies of it under the terms of
+the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
+There is NO WARRANTY, to the extent permitted by law.
+EOF
+}
diff --git a/scripts/dump-remind.in b/scripts/dump-remind.in
new file mode 100644
index 0000000..0b95f4b
--- /dev/null
+++ b/scripts/dump-remind.in
@@ -0,0 +1,103 @@
+#!/bin/sh
+# This file is included in the GNU tar distribution as an example. It is
+# not used by default unless the proper line is uncommented in backup-specs.
+# System administrators will probably want to customize this and
+# backup-specs for their site.
+#
+# This script should be run by tar with --info-script (-F) to inform
+# interested parties that a tape for the next volume of the backup needs to
+# be put in the tape drive.
+#
+
+# Include location of `sendmail' and GNU finger.
+PATH="/usr/lib:/usr/local/gnubin:${PATH}"
+export PATH
+
+# Load library routines
+SYSCONFDIR=${SYSCONFDIR-@sysconfdir@}
+. ${LIBPATH-@libexecdir@}/backup.sh
+
+MT_REWIND
+MT_OFFLINE
+
+# Get a list of people to whom to mail a request for changing the tape.
+# This egregious nightmare parses the output from GNU finger which shows
+# which users are logged into consoles (and thus in the office and capable
+# of changing tapes).
+#
+# Certain users (like `root') aren't real users, and shouldn't be notified.
+# Neither should `zippy', `elvis', etc. (on the GNU machines) since they're
+# just test accounts.
+recipients="`
+ finger .clients 2> /dev/null \
+ | sed -ne '
+ 1{
+ /clientstatus: file has not changed in/{
+ n;n;n;n;d
+ }
+ n;n;d
+ }
+ s/^..................................................//
+ $!{/^$/d
+ /^root?*$/d
+ /^zippy$/d
+ /^fnord$/d
+ /^elvis$/d
+ /^snurd$/d
+ H
+ }
+ ${g
+ : 1
+ s/\(\n\)\([A-Za-z0-9_][A-Za-z0-9_]*\)\(\n.*\)\2\(.*\)/\1\2\3\4/g
+ s/\n$//g
+ t 1
+ s/^\n//
+ s/\n$//g
+ s/\n/, /g
+ : 2
+ s/, ,/,/g
+ t 2
+ p
+ }'`"
+
+# Customized behavior for FSF machines, to bring attention to the fact that
+# the tape needs to be changed (who looks at the terminal?)
+sendmail -oi -t << __EOF__
+From: `basename $0` (backup tape-changing reminder)
+To: ${recipients}
+Cc: ${ADMINISTRATOR}
+Subject: Backup needs new tape for volume ${TAR_VOLUME}
+Reply-To: ${ADMINISTRATOR}
+
+This is an automated report from the backup script running on
+`hostname`.
+
+Volume ${TAR_VOLUME} of the backup needs to be put in the tape drive.
+Usually whoever prepared the backup leaves labeled tapes on top of the
+drive itself. If there aren't any more, information about where to find
+tapes and how to label them are posted on the wall by apple-gunkies
+(unhelpfully obscured by a bookshelf). An online copy (which is probably
+more up-to-date) can also be found in ~friedman/etc/fsf/backup.how.
+__EOF__
+
+
+echo "Please put volume ${TAR_VOLUME} in tape drive and press RETURN"
+read input
+echo "Writing volume ${TAR_VOLUME}..."
+
+sendmail -oi -t << __EOF__
+From: `basename $0` (backup tape-changing reminder)
+To: ${recipients}
+Cc: ${ADMINISTRATOR}
+Subject: Volume ${TAR_VOLUME} for backup has been added
+Reply-To: ${ADMINISTRATOR}
+
+This is an automated report from the backup script running on
+`hostname`.
+
+The backup has been continued, so for now no further attention is required.
+__EOF__
+
+exit 0
+
+# eof
diff --git a/scripts/restore.in b/scripts/restore.in
new file mode 100644
index 0000000..efc320a
--- /dev/null
+++ b/scripts/restore.in
@@ -0,0 +1,229 @@
+#! /bin/sh
+# This program is part of GNU tar
+# Copyright (C) 2004, 2006 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 1, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
+# Load library routines
+SYSCONFDIR=${SYSCONFDIR-@sysconfdir@}
+. ${LIBDIR-@libexecdir@}/backup.sh
+
+usage() {
+ cat - <<EOF
+usage: $PROGNAME [OPTIONS] [PATTERN [PATTERN...]]
+Options are:
+
+ -a, --all Restore all filesystems.
+ -l, --level=LEVEL Start restoring from the given backup LEVEL
+ (default $DUMP_LEVEL).
+ -v, --verbose[=LEVEL] Set verbosity level. Default 100.
+
+Informational options:
+ -h, --help Display this help message.
+ -V, --version Display program version.
+
+Send bug reports to @PACKAGE_BUGREPORT@.
+EOF
+}
+
+unset PATTERN
+DUMP_LEVEL=0
+CMDLINE="$0 $@"
+
+for opt
+do
+ if [ -z "$prev" ]; then
+ option=$opt
+ optarg=`expr "x$opt" : 'x[^=]*=\(.*\)'`
+ else
+ option="${prev}=$opt"
+ prev=""
+ optarg=$opt
+ fi
+ case $option in
+ -a|--a|--al|--all)
+ RESTORE_ALL=1
+ ;;
+ --l=*|--le=*|--lev=*|--leve=*|--level=*)
+ DUMP_LEVEL=$optarg
+ ;;
+ -l|--l|--le|--lev|--leve|--level)
+ prev=$option
+ ;;
+ --verb=*|--verbo=*|--verbos=*|--verbose=*)
+ VERBOSE=$optarg
+ ;;
+ -v|--verb|--verbo|--verbos|--verbose)
+ VERBOSE=100
+ ;;
+ -v*) VERBOSE=`expr $option : "-v\(.*\)"`;;
+ -V|--v|--ve|--ver|--vers|--versi|--versio|--version)
+ echo "restore (@PACKAGE_NAME@) @VERSION@"
+ license
+ exit;;
+ -h|--h|--he|--hel|--help)
+ usage
+ exit;;
+ -*) bailout "Unknown option $opt. Try $PROGNAME --help for more info.";;
+ *) if [ -z "$PATTERN" ]; then
+ PATTERN=$opt
+ else
+ PATTERN="$PATTERN|$opt"
+ fi
+ ;;
+ esac
+done
+
+if [ -z "$RESTORE_ALL" ]; then
+ if [ -z "$PATTERN" ]; then
+ usage
+ exit;
+ fi
+fi
+
+init_restore
+cat > $LOGFILE <<EOF
+This file contains any messages produced by $PROGNAME.
+
+It was created by GNU $PROGNAME, from @PACKAGE@ (@VERSION@).
+Invocation command line was
+
+ \$ $CMDLINE
+
+EOF
+
+restore_fs()
+{
+ fs="`echo \"${1}\" | sed -e 's/^.*://'`"
+ fs=`root_fs $fs`
+ fsname="`echo \"${1}\" | sed -e 's/\//:/g'`"
+ remotehost="`expr \"${1}\" : '\([^/][^/]*\):.*'`"
+ if [ -z "$remotehost" ]; then
+ remotehost=$localhost
+ fi
+ message 10 "fs=$fs"
+ message 10 "fsname=$fsname"
+ message 10 "remotehost=$remotehost"
+
+ LOGPAT="`level_log_name ${fsname} '[0-9]'`"
+ PREFIX="`level_log_name ${fsname} ''`"
+ message 10 LOGPAT=$LOGPAT
+ message 10 PREFIX=$PREFIX
+ LEVELS=`remote_run "${remotehost}" ls $LOGPAT |
+ sed "s,$PREFIX,," | sort -n`
+ message 10 "LEVELS=$LEVELS"
+
+ echo "Starting restore of ${1} at level $DUMP_LEVEL."
+ for level in $LEVELS
+ do
+ if [ $level -lt $DUMP_LEVEL ]; then
+ message 10 "Skipping level $level"
+ continue;
+ fi
+ message 10 "Restoring level $level"
+
+ DATE=`get_dump_time $level`
+ FILE="`level_log_name ${fsname} ${level}`"
+ message 10 "FILE=$FILE"
+
+ LABEL="`print_level $level` backup of ${fs} on ${remotehost} at ${DATE}"
+ ${RESTORE_BEGIN-:} $level $remotehost $fs $fsname
+ backup_host ${remotehost} \
+ "--listed=\"$FILE\"" \
+ "--label=\"$LABEL\"" \
+ -C $fs
+ ${RESTORE_END-:} $level $remotehost $fs $fsname
+ done
+}
+
+restore_files()
+{
+ LOGPAT="`level_log_name MISC '[0-9]'`"
+ PREFIX="`level_log_name MISC ''`"
+ message 10 LOGPAT=$LOGPAT
+ message 10 PREFIX=$PREFIX
+ LEVELS=`remote_run "${localhost}" ls $LOGPAT | sed "s,$PREFIX,," | sort -n`
+ message 10 "LEVELS=$LEVELS"
+
+ echo "Starting restore of miscellaneous files at level $DUMP_LEVEL."
+ for level in $LEVELS
+ do
+ if [ $level -lt $DUMP_LEVEL ]; then
+ message 10 "Skipping level $level"
+ continue;
+ fi
+ message 10 "Restoring level $level"
+
+ DATE=`get_dump_time $level`
+ FILE="`level_log_name MISC ${level}`"
+ message 10 "FILE=$FILE"
+
+ LABEL="`print_level $level` backup of miscellaneous files at ${DATE}"
+ ${RESTORE_BEGIN-:} $level $localhost MISC MISC
+ backup_host ${localhost} \
+ "--listed=\"$FILE\"" \
+ "--label=\"$LABEL\"" \
+ -C ${ROOT_FS-/} $@
+ ${RESTORE_END-:} $level $localhost MISC MISC
+ done
+}
+
+# Operation Overwiew:
+#
+# 1. Determine the time of the last backup
+# 2. Create list of incremental listings to process
+# 3. For each filesystem:
+# 3.1. Start at the requested dump level (default 0) and proceed up to
+# the last available level:
+# 3.1.1 Deduce the volume label
+# 3.1.2. Invoke [rsh] tar --listed=FILE --label=LABEL [opts] -xf $TAPE_FILE
+# 4. End
+
+(message 1 "Preparing for restore"
+
+message 1 "processing backup directories"
+
+for dir in ${BACKUP_DIRS}
+do
+ message 1 "Processing $dir"
+ case $dir in
+ ${PATTERN-*}) restore_fs $dir;;
+ esac
+done
+
+if [ "x${BACKUP_FILES}" != "x" ] ; then
+ message 1 "processing miscellaneous files"
+ if [ -z "$PATTERN" ]; then
+ restore_files
+ else
+ RESTORE_FILES=""
+ for file in ${BACKUP_FILES}
+ do
+ rel_file=`expr $file : '/\(.*\)'`
+ case $file in
+ $PATTERN) if [ -z "$RESTORE_FILES" ]; then
+ RESTORE_FILES="$rel_file"
+ else
+ RESTORE_FILES="$RESTORE_FILES $rel_file"
+ fi;;
+ esac
+ done
+ [ -z "$RESTORE_FILES" ] || restore_files $RESTORE_FILES
+ fi
+
+fi) 2>&1 | tee -a "${LOGFILE}"
+
+# EOF