diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/Makefile.am | 9 | ||||
-rw-r--r-- | examples/Makefile.in | 320 | ||||
-rw-r--r-- | examples/example.dup | 141 | ||||
-rw-r--r-- | examples/example.ldap | 45 | ||||
-rw-r--r-- | examples/example.maildir | 58 | ||||
-rw-r--r-- | examples/example.makecd | 31 | ||||
-rw-r--r-- | examples/example.mysql | 85 | ||||
-rw-r--r-- | examples/example.pgsql | 23 | ||||
-rw-r--r-- | examples/example.rdiff | 120 | ||||
-rw-r--r-- | examples/example.rsync | 127 | ||||
-rw-r--r-- | examples/example.sh | 2 | ||||
-rw-r--r-- | examples/example.svn | 26 | ||||
-rw-r--r-- | examples/example.sys | 52 | ||||
-rw-r--r-- | examples/example.trac | 16 |
14 files changed, 1055 insertions, 0 deletions
diff --git a/examples/Makefile.am b/examples/Makefile.am new file mode 100644 index 0000000..a2ffbb2 --- /dev/null +++ b/examples/Makefile.am @@ -0,0 +1,9 @@ + +EXAMPLES = example.dup example.ldap example.makecd example.mysql \ + example.pgsql example.rdiff example.sh example.rsync \ + example.svn example.sys example.trac example.maildir + +EXTRA_DIST = $(EXAMPLES) + +dist_pkgdata_DATA = $(EXAMPLES) + diff --git a/examples/Makefile.in b/examples/Makefile.in new file mode 100644 index 0000000..900b5ec --- /dev/null +++ b/examples/Makefile.in @@ -0,0 +1,320 @@ +# Makefile.in generated by automake 1.10.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 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@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@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 = : +subdir = examples +DIST_COMMON = $(dist_pkgdata_DATA) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(pkgdatadir)" +dist_pkgdataDATA_INSTALL = $(INSTALL_DATA) +DATA = $(dist_pkgdata_DATA) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASH = @BASH@ +CFGDIR = @CFGDIR@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +HAVE_RPM = @HAVE_RPM@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MKTEMP = @MKTEMP@ +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@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_cv_have_rpm = @ac_cv_have_rpm@ +am__leading_dot = @am__leading_dot@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build_alias = @build_alias@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host_alias = @host_alias@ +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@ +EXAMPLES = example.dup example.ldap example.makecd example.mysql \ + example.pgsql example.rdiff example.sh example.rsync \ + example.svn example.sys example.trac example.maildir + +EXTRA_DIST = $(EXAMPLES) +dist_pkgdata_DATA = $(EXAMPLES) +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) --gnu examples/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu examples/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-dist_pkgdataDATA: $(dist_pkgdata_DATA) + @$(NORMAL_INSTALL) + test -z "$(pkgdatadir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)" + @list='$(dist_pkgdata_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(dist_pkgdataDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgdatadir)/$$f'"; \ + $(dist_pkgdataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgdatadir)/$$f"; \ + done + +uninstall-dist_pkgdataDATA: + @$(NORMAL_UNINSTALL) + @list='$(dist_pkgdata_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(pkgdatadir)/$$f'"; \ + rm -f "$(DESTDIR)$(pkgdatadir)/$$f"; \ + done +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 $(DATA) +installdirs: + for dir in "$(DESTDIR)$(pkgdatadir)"; 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: + +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-dist_pkgdataDATA + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +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-dist_pkgdataDATA + +.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-dist_pkgdataDATA install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ + pdf-am ps ps-am uninstall uninstall-am \ + uninstall-dist_pkgdataDATA + +# 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/examples/example.dup b/examples/example.dup new file mode 100644 index 0000000..d490f74 --- /dev/null +++ b/examples/example.dup @@ -0,0 +1,141 @@ + +# passed directly to duplicity +#options = --verbosity 8 + +# default is 0, but set to 19 if you want to lower the priority. +nicelevel = 19 + +# default is yes. set to no to skip the test if the remote host is alive +#testconnect = no + +# temporary directory used by duplicity +# (default = /tmp or /usr/tmp, depending on the system) +#tmpdir = /var/tmp/duplicity + +###################################################### +## gpg section +## (how to encrypt and optionally sign the backups) +## +## WARNING: old (pre-0.9.4) example.dup used to give wrong information about +## the way the following options are used. Please read the following +## carefully. +## +## If the encryptkey variable is set: +## - data is encrypted with the GnuPG public key specified by the encryptkey +## variable +## - if signing is enabled, data is signed with the GnuPG private +## key specified by the signkey variable +## - the password variable is used to unlock the GnuPG key(s) used +## for encryption and (optionnal) signing +## +## If the encryptkey option is not set: +## - data signing is not possible +## - the password variable is used to encrypt the data with symmetric +## encryption: no GnuPG key pair is needed + +[gpg] + +# when set to yes, encryptkey variable must be set below; if you want to use +# two different keys for encryption and signing, you must also set the signkey +# variable below. +# default is no, for backwards compatibility with backupninja <= 0.5. +sign = yes + +# ID of the GnuPG public key used for data encryption. +# if not set, symmetric encryption is used, and data signing is not possible. +encryptkey = 04D9EA79 + +# ID of the GnuPG private key used for data signing. +# if not set, encryptkey will be used. +#signkey = 04D9EA79 + +# password +# NB: neither quote this, nor should it contain any quotes +password = a_very_complicated_passphrase + +###################################################### +## source section +## (where the files to be backed up are coming from) + +[source] + +# A few notes about includes and excludes: +# 1. include, exclude and vsinclude statements support globbing with '*' +# 2. Symlinks are not dereferenced. Moreover, an include line whose path +# contains, at any level, a symlink to a directory, will only have the +# symlink backed-up, not the target directory's content. Yes, you have to +# dereference yourself the symlinks, or to use 'mount --bind' instead. +# Example: let's say /home is a symlink to /mnt/crypt/home ; the following +# line will only backup a "/home" symlink ; neither /home/user nor +# /home/user/Mail will be backed-up : +# include = /home/user/Mail +# A workaround is to 'mount --bind /mnt/crypt/home /home' ; another one is to +# write : +# include = /mnt/crypt/home/user/Mail +# 3. All the excludes come after all the includes. The order is not otherwise +# taken into account. + +# files to include in the backup +include = /var/spool/cron/crontabs +include = /var/backups +include = /etc +include = /root +include = /home +include = /usr/local/bin +include = /usr/local/sbin +include = /var/lib/dpkg/status +include = /var/lib/dpkg/status-old + +# If vservers = yes in /etc/backupninja.conf then the following variables can +# be used: +# vsnames = all | <vserver1> <vserver2> ... (default = all) +# vsinclude = <path> +# vsinclude = <path> +# ... +# Any path specified in vsinclude is added to the include list for each vserver +# listed in vsnames (or all if vsnames = all, which is the default). +# +# For example, vsinclude = /home will backup the /home directory in every +# vserver listed in vsnames. If you have 'vsnames = foo bar baz', this +# vsinclude will add to the include list /vservers/foo/home, /vservers/bar/home +# and /vservers/baz/home. +# Vservers paths are derived from $VROOTDIR. + +# files to exclude from the backup +exclude = /home/*/.gnupg + +###################################################### +## destination section +## (where the files are copied to) + +[dest] + +# perform an incremental backup? (default = yes) +# if incremental = no, perform a full backup in order to start a new backup set +#incremental = yes + +# how many days of data to keep ; default is 60 days. +# (you can also use the time format of duplicity) +# 'keep = yes' means : do not delete old data, the remote host will take care of this +#keep = 60 +#keep = yes + +# bandwith limit, in kbit/s ; default is 0, i.e. no limit +#bandwidthlimit = 128 + +# passed directly to ssh, scp (and sftp in duplicity >=0.4.2) +# warning: sftp does not support all scp options, especially -i; as +# a workaround, you can use "-o <SSHOPTION>" +sshoptions = -o IdentityFile=/root/.ssh/id_dsa_duplicity + +# put the backups under this directory +destdir = /backups + +# the machine which will receive the backups +desthost = backuphost + +# make the files owned by this user +# note: you must be able to ssh backupuser@backhost +# without specifying a password (if type = remote). +destuser = backupuser + diff --git a/examples/example.ldap b/examples/example.ldap new file mode 100644 index 0000000..adc1fcd --- /dev/null +++ b/examples/example.ldap @@ -0,0 +1,45 @@ +## +## configuration file for openldap backups +## +## If the method is set to "slapcat", the LDIFs generated are +## suitable for use with slapadd. As the entries are in database +## order, not superior first order, they cannot be loaded with +## ldapadd without being reordered. +## + +## backupdir (default /var/backups/ldap): the destination for the backups +# backupdir = /var/backups/ldap + +## conf (default /etc/ldap/slapd.conf): the location of the slapd.conf file. +# conf = /etc/ldap/slapd.conf + +## databases (default all): either a space separated list of database +## numbers or prefixes, or the keyword 'all'. +# databases = all + +## compress (default yes): if set to yes, ldif exports are gzipped. +# compress = yes + +## restart (default no): if set to yes, slapd is stopped before backups are +## performed, and then started again after they have finished, this is necessary +## if your backend is ldbm and your method is slapcat, but unnecessary otherwise. +# restart = no + +## method (default ldapsearch): either 'ldapsearch' or 'slapcat' +## ldapsearch is the safer method to do backups, but is slow, slapcat +## is much faster, but should not be done on an ldbm backend unless you have +## restart set to yes +## NOTE: with the ldapsearch method passwordfile and binddn need to be set +# method = ldapsearch + +## passwordfile (no default): this should be set to the file that contains +## your ldap password, this is required for ldapsearch and not needed for slapcat +## this file should have no newlines in it, echo -n "password" > passfile works. +## NOTE: be sure to set the permissions on your password file appropriately +## (hint: world readable is not appropriate) +# passwordfile = + +## binddn (no default): set this to the DN of the user that the ldapsearch binds +## to, not needed for slapcat +# binddn = + diff --git a/examples/example.maildir b/examples/example.maildir new file mode 100644 index 0000000..8898a78 --- /dev/null +++ b/examples/example.maildir @@ -0,0 +1,58 @@ +## +## This is an example maildir configuration file. +## +## The maildir handler slowly creates a backup of each user's +## maildir to a remote server. It is designed to be run with +## low overhead in terms of CPU and bandwidth, so it runs pretty +## slow. Hardlinking is used to save storage space. The actual +## maildir is stored within each snapshot directory. +## +## The basic algorithm is to rsync each maildir individually, +## and to use hard links for retaining historical data. +## +## We handle each maildir individually because it becomes very +## unweldy to hardlink and rsync many hundreds of thousands +## of files at once. It is much faster to take on smaller +## chunks at a time. +## +## Any maildir which is deleted from the source will be moved to +## "deleted" directory in the destination. It is up to you to +## periodically remove this directory or old maildirs in it. +## +## Note: This handler assumes that the remote shell is set to bash +## +## The defaults are useful in most cases, just make sure +## to configure the source and destination information + +when = everyday at 21:00 + +## each users maildir will contain these files: +## daily.1, daily.2, daily.3, daily.4, daily.5, weekly.1, weekly.2, +## weekly.3, monthly.1 +## if keepdaily is 5, keepweekly is 3, and keepmonthly is 1 +keepdaily = 5 +keepweekly = 3 +keepmonthly = 1 + +# directory which contains all the maildirs +srcdir = /maildir/riseup.net + +# the srcdir is expected to contain the following subdirectories. Each +# of these will contain the user's Maildirs which start with these +# letters +srcsubdirs = 0 1 2 3 4 5 6 7 8 9 a b c d e f g h i j k l m n o p q r s t u v w x y z + +# put the backups under this directory +destdir = /crypta/maildir/riseup.net +desthost = kakapo-pn + +# For the backup rotation to work, destuser must be able to run +# arbitrary bash commands on the desthost. +destuser = backer + +# remove any maildirs from backup which might have been deleted +remove = yes + +# use a ssh-mux to reuse connections, see the following article +# http://www.debian-administration.org/articles/290 for an example +multiconnection = notset diff --git a/examples/example.makecd b/examples/example.makecd new file mode 100644 index 0000000..b01094e --- /dev/null +++ b/examples/example.makecd @@ -0,0 +1,31 @@ + +# TYP is cd or dvd AS WELL AS the disk inside!! +burnertype = cd + +# system (yes) or directory/files (no) +# this function not yet implemented +#system = yes + +# location for image file +backupdir = /var/backups/makecd + +# image filename +imagefile = example.iso + +# iso or burn to cd/dvd? +isoonly = no + +# cd/dvd burner device +device=/dev/hdc + +# base directory to include in the backup +target = / + +# files or directories to be excluded +exclude = /proc +exclude = /lost+found +exclude = /tmp + +# backupninja will perfrom this at gvien date/time +when = wednesday at 02:00 + diff --git a/examples/example.mysql b/examples/example.mysql new file mode 100644 index 0000000..bd996e7 --- /dev/null +++ b/examples/example.mysql @@ -0,0 +1,85 @@ +### backupninja mysql config file ### + +databases = all +backupdir = /var/backups/mysql +hotcopy = no +sqldump = yes +compress = yes + +### authentication ### + +# three authentication methods: +# +# 1. setting the user, so that /home/user/.my.cnf is used. +# user = some-unix-user +# +# 2. specifying the mysql dbuser and dbpassword, +# which generates a temporary .my.cnf in /root/.my.cnf +# dbusername = <some-mysql-user> +# dbpassword = <password> +# +# 3. specify which config file to use with configfile +# (this option does not work with hotcopy) +# configfile = /etc/mysql/debian.cnf +# +# if user and dbusername are not specified, the default is to use +# /etc/mysql/debian.cnf for configfile. + +### all options ### + +# configfile = < path/to/file > (default = /etc/mysql/debian.cnf) +# The config file is passed to mysql with --defaults-file. +# On debian, this default will allow backupninja to make backups +# of mysql without configuring any additional options. +# (this option is not compatible with "user" or "dbusername"). +# +# user = <user> (default = root) +# Run mysql commands as 'user'. A valid .my.cnf must exist with a +# database username and password in the user's home directory. +# (this option is not compatible with "configfile" or "dbusername"). +# +# dbusername = <dbuser> (no default) +# The user must have access to the databases specified later. +# (this option is not compatible with "configfile" or "user"). +# +# dbpassword = <dbpass> (no default) +# The password used with dbusername. this password will NOT be passed +# on the command line and is not readable using "ps aux". +# +# dbhost = <host> (default = localhost) +# only localhost works right now. +# +# databases = < all | db1 db2 db3 > (default = all) +# which databases to backup. should either be the word 'all' or a +# space separated list of database names. +# +# nodata = < db.table1 db.table2 db.table3 > (no default) +# only dump the structure for the database tables listed here, this means +# no data contained in these tables will be dumped. This is very useful +# to backup databases that have tables with large amounts of cache data that +# isn't necessary to backup, but you still need the structure to exist +# on a restore. You *must* specify the table as part of a database, such +# as "drupal.cache", where the database name is "drupal" and the table that +# you do not want to dump the data for is called "cache". +# +# backupdir = < path/to/destination > (default = /var/backups/mysql) +# where to dump the backups. hotcopy backups will be in a subdirectory +# 'hotcopy' and sqldump backups will be in a subdirectory 'sqldump' +# +# hotcopy = < yes | no > (default = no) +# make a backup of the actual database binary files using mysqlhotcopy. +# +# sqldump = < yes | no > (default = no) +# make a backup using mysqldump. this creates text files with sql commands +# sufficient to recontruct the database. +# +# compress = < yes | no > (default = yes) +# if yes, compress the sqldump output. +# +# vsname = <vserver> (no default) +# what vserver to operate on (only used if vserver = yes +# in /etc/backupninja.conf), if you do not specify a vsname the +# host will be operated on +# +# NB: databases = all doesn't seem to work with hotcopy = yes +# when vsname is specified, I would like to know how to fix this. diff --git a/examples/example.pgsql b/examples/example.pgsql new file mode 100644 index 0000000..42f045e --- /dev/null +++ b/examples/example.pgsql @@ -0,0 +1,23 @@ +### backupninja PostgreSQL config file ### + +# vsname = <vserver> (no default) +# what vserver to operate on, only used if vserver = yes in /etc/backupninja.conf +# if you do not specify a vsname the host will be operated on +# Note: if operating on a vserver, $VROOTDIR will be prepended to backupdir. + +# backupdir = <dir> (default: /var/backups/postgres) +# where to dump the backups + +# databases = < all | db1 db2 db3 > (default = all) +# which databases to backup. should either be the word 'all' or a +# space separated list of database names. +# Note: when using 'all', pg_dumpall is used instead of pg_dump, which means +# that cluster-wide data (such as users and groups) are saved. + +# compress = < yes | no > (default = yes) +# if yes, compress the pg_dump/pg_dumpall output. + +### You can also set the following variables in /etc/backupninja.conf: +# PGSQLDUMP: pg_dump path (default: /usr/bin/pg_dump) +# PGSQLDUMPALL: pg_dumpall path (default: /usr/bin/pg_dumpall) +# PGSQLUSER: user running PostgreSQL (default: postgres) diff --git a/examples/example.rdiff b/examples/example.rdiff new file mode 100644 index 0000000..3767f9b --- /dev/null +++ b/examples/example.rdiff @@ -0,0 +1,120 @@ +## +## This is an example rdiff-backup configuration file. +## The defaults are useful in most cases, just make sure +## to configure the destination host and user. +## + +## passed directly to rdiff-backup +# options = --force + +## default is 0, but set to 19 if you want to lower the priority. +# nicelevel = 19 + +## default is yes. set to no to skip the test if the remote host is alive +# testconnect = no + +## default is not to limit bandwidth. +## set to a number in bytes/second to limit bandwidth usage. Use a negative +## number to set a limit that will never be exceeded, or a positive number +## to set a target average bandwidth use. cstream is required. See cstream's +## -t option for more information. 62500 bytes = 500 Kb (.5 Mb) +# bwlimit = 62500 + +## should backupninja ignore the version differences between source and remote +## rdiff-backup? (default: no) +## This could be useful if the version differences between rdiff-backup instances +## on remote and local side are different, and you are certain there are no +## problems in using mis-matched versions and want to get beyond this check. +## An example usage could be the remote side has its authorized_keys configured +## with command="rdiff-backup --server" to allow for restricted yet automated +## password-less backups +# ignore_version = no + +###################################################### +## source section +## (where the files to be backed up are coming from) + +[source] + +# an optional subdirectory below 'directory' (see [dest]) +label = thishostname + +# type can be "local" or "remote" +type = local + +# only use if '[source] type = remote' +#host = srchost +#user = srcuser + +# how many days of data to keep +# (you can also use the time format of rdiff-backup, e.g. 6D5h) +# (to keep everything, set this to yes) +#keep = yes +keep = 60 + +# A few notes about includes and excludes: +# 1. include, exclude and vsinclude statements support globbing with '*' +# 2. Symlinks are not dereferenced. Moreover, an include line whose path +# contains, at any level, a symlink to a directory, will only have the +# symlink backed-up, not the target directory's content. Yes, you have to +# dereference yourself the symlinks, or to use 'mount --bind' instead. +# Example: let's say /home is a symlink to /mnt/crypt/home ; the following +# line will only backup a "/home" symlink ; neither /home/user nor +# /home/user/Mail will be backed-up : +# include = /home/user/Mail +# A workaround is to 'mount --bind /mnt/crypt/home /home' ; another one is to +# write : +# include = /mnt/crypt/home/user/Mail +# 3. All the excludes come after all the includes. The order is not otherwise +# taken into account. + +# files to include in the backup +include = /var/spool/cron/crontabs +include = /var/backups +include = /etc +include = /root +include = /home +include = /usr/local/bin +include = /usr/local/sbin +include = /var/lib/dpkg/status +include = /var/lib/dpkg/status-old + +# If vservers = yes in /etc/backupninja.conf then the following variables can +# be used: +# vsnames = all | <vserver1> <vserver2> ... (default = all) +# vsinclude = <path> +# vsinclude = <path> +# ... +# Any path specified in vsinclude is added to the include list for each vserver +# listed in vsnames (or all if vsnames = all, which is the default). +# +# For example, vsinclude = /home will backup the /home directory in every +# vserver listed in vsnames. If you have 'vsnames = foo bar baz', this +# vsinclude will add to the include list /vservers/foo/home, /vservers/bar/home +# and /vservers/baz/home. +# Vservers paths are derived from $VROOTDIR. + +# files to exclude from the backup +#exclude = /home/*/.gnupg + +###################################################### +## destination section +## (where the files are copied to) + +[dest] + +# type can be "local" or "remote" +type = remote + +# put the backups under this directory +directory = /backups + +# the machine which will receive the backups. +# only use if "[dest] type = remote" +host = backuphost + +# make the files owned by this user. you must be able to +# `su -c "ssh backupuser@backhost"` without specifying a password. +# only use if "[dest] type = remote" +user = backupuser + diff --git a/examples/example.rsync b/examples/example.rsync new file mode 100644 index 0000000..9053f3e --- /dev/null +++ b/examples/example.rsync @@ -0,0 +1,127 @@ +# +# rsync handler example file +# +# Mandatory options are uncommented with sugested values +# Other options are commented out with their default values +# +# Note: You dont need to manually specify vservers using "include = /vservers". +# They're automatically backuped if vserver is set to "yes" on you backupninja.conf. + +[general] + +# rsync log file +#log = /var/log/backup/rsync.log + +# partition device where the backup lives +# just use this option if your data is backed up in a separate partition and +# you want backupninja to fsck it; this option will just be used if fscheck +# (see below) is set to 'yes' +#partition = + +# backup partition mountpoint or backup main folder +# this doesn't need to be a real partition, but should be at least the +# main folder where the backup is being stored +mountpoint = /mnt/backup + +# folder relative do mountpoint where the backup should be stored +backupdir = myserver + +# number of backup increments (min = 5) +days = 7 + +# set to 1 if fsck should run on partition after the backup is made +#fscheck = + +# set to 1 if $partition is mounted read-only +#read_only = + +# use this if you need a lockfile to be kept during backup execution +# this is an useful feature in case you have some tasks that should +# know if the backup is running or not +#lockfile = + +# rsync command nice level +#nicelevel = 0 + +# set to "yes" if your system isnt handling timestamps correctly +#enable_mv_timestamp_bug = no + +# temp folder +#tmp = /tmp + +[source] + +# where the data to be backed up is (local or remote) +#from = local + +# if remote source, specify the hostname or IP +#host = + +# when "yes", test the connection for a remote source before backup +#testconnect = no + +# include folder on backup +include = /etc +include = /var + +# exclude folder on backup +exclude = exclude_folder1 +exclude = exclude_folder2 + +# exlude some vserver from backup +# this is used only if vservers = yes on backupninja.conf +exclude_vserver = excluded_vserver1 +exclude_vserver = excluded_vserver2 + +# ssh command line (remote only) +#ssh = ssh + +# rsync program +# it defaults to $RSYNC value from backupninja.conf +#rsync = $RSYNC + +# rsync command options +#rsync_options = "-av --delete" + +# when set to 1, use numeric ids instead of user/group mappings on rsync +#numericids = 0 + +# if set to 1, compress data on rsync (remote source only) +#compress = 0 + +# set a badnwidth limit in kbps (remote source only) +#bandwidthlimit = + +# remote rsync program (remote source only) +#remote_rsync = rsync + +# This section is used to stop and start services that should be turned of +# during the backup procedure. +# +#[services] +# +# absolute path where scripts are located +#initscripts = +# +# script name to be stoped at the begining of the backup and started at its end +#service = + +# You can also specify some system comands if you don't want the default system values +# by enabling the section below. +# +#[system] +# +# rm command +#rm = rm +# +# cp command +#cp = cp +# +# touch command +#touch = touch +# +# mv command +#mv = mv +# +# fsck command +#fsck = fsck diff --git a/examples/example.sh b/examples/example.sh new file mode 100644 index 0000000..f02f026 --- /dev/null +++ b/examples/example.sh @@ -0,0 +1,2 @@ + +dpkg --get-selections > /var/backups/dpkg-selections.txt diff --git a/examples/example.svn b/examples/example.svn new file mode 100644 index 0000000..ea43601 --- /dev/null +++ b/examples/example.svn @@ -0,0 +1,26 @@ +## +## Perform a hot backup of subversion repositories. +## +## REQUIRES: apt-get install subversion-tools +## +## This file can be empty, the defaults are usually good. +## + +## where subversion data lives +# src = /var/lib/svn + +## where to save the backups to +# dest = /var/backups/svn + +## where to save temporary backups +## (if successful, $tmp is moved to $dest) +# tmp = /var/backups/svn.tmp + +## the hotbackup program to use. +## svnadmin hotcopy now exists, the following script is located +## in /usr/share/doc/subversion/examples now if you wish to use +## it instead +# HOTBACKUP = /usr/lib/subversion/hot-backup.py + +## the name of the vserver containing svn, if using vservers +# vsname = diff --git a/examples/example.sys b/examples/example.sys new file mode 100644 index 0000000..af28fd6 --- /dev/null +++ b/examples/example.sys @@ -0,0 +1,52 @@ +# +# this config file will save various reports of vital system information. +# by default, all the reports are enabled and are saved in /var/backups. +# +# requires dpkg, debconf-utils, sfdisk, and hwinfo +# +# (1) a capture of the debconf package selection states. This file +# can be used to restore the answers to debconf questions for +# packages that you will be installing through (2) below. To +# do this, run: "debconf-set-selections < debconfsel.txt" +# +# (2) a list of all the packages installed and removed. +# this file can be used to restore the state of installed packages +# by running "dpkg --set-selections < dpkg-selections.txt and +# then run "apt-get -u dselect-upgrade". If you have the +# debconf-set-selections file from (1), you should restore those first. +# +# (3) the partition table of all disks. +# this partition table can be used to format another disk of +# the same size. this can be handy if using software raid and +# you have a disk go bad. just replace the disk and partition it +# by running "sfdisk /dev/sdb < partitions.sdb.txt" +# (MAKE SURE YOU PARTITION THE CORRECT DISK!!!) +# +# (4) hardware information. +# detailed information on most important aspects of the hardware. +# + +# here are the defaults, commented out: + +# The output from the sys handler will be placed in $parentdir +# parentdir = /var/backups +# packages = yes +# packagesfile = /var/backups/dpkg-selections.txt +# selectionsfile = /var/backups/debconfsel.txt + +# partitions = yes +# NOTE: the __star__ below will be replaced by the disks found on the +# system (e.g. partitions.sda.txt, partitions.sdb.txt). If you change +# the partitionsfile default below, be sure to include the __star__ +# replacement in the filename, or you will get one file for only one disk, +# the others being written to the same file, and then overwritten by the next. +# partitionsfile = /var/backups/partitions.__star__.txt +# dosfdisk = yes + +# hardware = yes +# hardwarefile = /var/backups/hardware.txt +# dohwinfo = yes + +# If vservers = yes in /etc/backupninja.conf then the following variables can +# be used: +# vsnames = all | <vserver1> <vserver2> ... (default = all) diff --git a/examples/example.trac b/examples/example.trac new file mode 100644 index 0000000..645998e --- /dev/null +++ b/examples/example.trac @@ -0,0 +1,16 @@ +## +## Perform backups of trac environment +## +## REQUIRES: apt-get install trac +## +## This file can be empty, the defaults are usually good. +## + +## where one or more Trac environments live +src = /var/lib/trac + +## where to save the backups to +dest = /var/backups/trac + +## where to save temporary backups +tmp = /var/backups/trac.tmp |