Farmer, Italian language teacher, Lisp functional programmer, sysadmin and free-software fellow
bak.conf
#
# /usr/local/etc/bak.conf: bak(8) configuration
#
# List of files and directories *without* default versions to backup.
# Paths must be separated by at least one blank character.
# Literally space characters in file names must be quoted.
# You can use "\" at the end of a line as a continuation character.
# E.g.:
# source=(/etc/{asound.state,ppp/ip-up} \
# /home/*/{bin,.bashrc,.profile} \
# /usr/local/{bin,sbin,etc/bak.conf})
source=()
# Extension used for default configuration files.
# Basic regular expressions as supported by sed(1) are allowed:
# e.g. "\(\.default\|\.sample\|-dist\)"; note that a "." must
# be escaped to be taken literally. See regex(7) for details.
# Also note that only Linux supports REs when using the
# "locate" or "update" mode.
default="\.bak-default"
# Config file auto-search mode. See bak(8) for details.
# Valid choices are: find, locate, off, update
mode="locate"
# Full path to the script that updates the locate database.
# Used by "-u, --update" option.
update="/etc/cron.daily/mlocate"
# Default output archive file; may be overriden by the "-o" option.
outfile="/root/bak-$(hostname -s)-$(hostid).tgz"
# Additional options to the archiver. See tar(1) for details.
taropt="-zhP"
# List of exclusion patterns; see "-X" and "--exclude" options
# of tar(1) for details. Please note that patterns *must* be
# quoted unless you really want the shell to expand them.
exclude=("*~")
# Local actions taken *before* creating the archive;
# any shell command/script is allowed.
# E.g. to save the list of installed packages:
#
# "pacman -Q >/root/pkg.list" (Arch Linux)
# "rpm -qa >/root/pkg.list" (SuSE, Fedora, Mandriva)
# "dpkg-query -l >/root/pkg.list" (Debian Linux)
# "dpkg --get-selections >/root/pkg.list" (Debian Linux)
# "pkginfo -i >/root/pkg.list" (Crux Linux)
# "pkg_info >/root/pkg.list" (FreeBSD)
#
# Note that temporary or permanent files created here must be
# included in the source list above in order to be backupped.
pre() {
# pre-archive script
return
}
# Local actions taken *after* creating the archive;
# any shell command/script is allowed.
# E.g. copy the archive file on floppy o record it on CD
post() {
# post-archive script
return
}