diff options
Diffstat (limited to 'etc/backup.d')
-rw-r--r-- | etc/backup.d/example.ldap | 20 | ||||
-rw-r--r-- | etc/backup.d/example.mysql | 47 | ||||
-rw-r--r-- | etc/backup.d/example.rdiff | 52 | ||||
-rw-r--r-- | etc/backup.d/example.sh | 2 |
4 files changed, 121 insertions, 0 deletions
diff --git a/etc/backup.d/example.ldap b/etc/backup.d/example.ldap new file mode 100644 index 0000000..4491d12 --- /dev/null +++ b/etc/backup.d/example.ldap @@ -0,0 +1,20 @@ +## +## configuration file for openldap backups +## +## 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 diff --git a/etc/backup.d/example.mysql b/etc/backup.d/example.mysql new file mode 100644 index 0000000..1c08fd3 --- /dev/null +++ b/etc/backup.d/example.mysql @@ -0,0 +1,47 @@ +dbusername = root +dbpassword = test +dbhost = localhost +databases = all +backupdir = /var/backups/mysql +hotcopy = yes +sqldump = yes +compress = yes + +# +# user = <user> +# Run mysql commands as 'user'. A valid .my.cnf must exist with a +# database username and password in the user's home directory. +# If this option is not set, use dbusername and dbpassword instead. +# +# dbusername = <dbuser> +# The user must have access to the databases specified later. +# Use this option if not using the 'user' option. +# +# dbpassword = <dbpass> +# The password. this password will NOT be passed on the command line +# and is not readable using "ps aux". make sure that this file is not +# world readable. Use this to specify the password in this config file +# instead of ~user/.my.cnf. +# +# dbhost = <host> +# only localhost works right now. +# +# databases = < all | db1 db2 db3 > +# which databases to backup. should either be the word 'all' or a +# comma seperated list of database names. +# +# backupdir = < path/to/destination > +# 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 > +# make a backup of the actual database binary files using mysqlhotcopy. +# +# sqldump = < yes | no > +# make a backup using mysqldump. this creates text files with sql commands +# sufficient to recontruct the database. +# +# compress = < yes | no > +# if yes, compress the sqldump output. +# + diff --git a/etc/backup.d/example.rdiff b/etc/backup.d/example.rdiff new file mode 100644 index 0000000..f0b9afb --- /dev/null +++ b/etc/backup.d/example.rdiff @@ -0,0 +1,52 @@ + +###################################################### +## source section +## (where the files to be backed up are coming from) + +[source] + +# an optional subdirectory below 'directory' (see [dest]) +label = thishostname + +# only local type is currently supported +type = local + +# how many days of data to keep +keep = 185 + +# files to include in the backup +# (supports globbing with '*') +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 + +# files to exclude from the backup +# (supports globbing with '*') +#exclude = /home/*/.gnupg + +###################################################### +## destination section +## (where the files are copied to) + +[dest] + +# only remote type is currently supported +type = remote + +# the machine which will receive the backups +host = backuphost + +# put the backups under this directory +directory = /backups + +# make the files owned by this user +# note: you must be able to ssh backupuser@backhost +# without specifying a password +user = backupuser + diff --git a/etc/backup.d/example.sh b/etc/backup.d/example.sh new file mode 100644 index 0000000..f02f026 --- /dev/null +++ b/etc/backup.d/example.sh @@ -0,0 +1,2 @@ + +dpkg --get-selections > /var/backups/dpkg-selections.txt |