Commit d00d6d73 authored by Daniel Armbruster's avatar Daniel Armbruster Committed by thomas.forbriger
Browse files

new configuration file syntax

This is a legacy commit from before 2015-05-18.
It may be incomplete as well as inconsistent.
See COPYING.legacy and README.history for details.

Using pythons configparser module
http://docs.python.org/dev/library/configparser.html it's much more comfortable
to read this syntax.


SVN Path:     http://gpitrsvn.gpi.uni-karlsruhe.de/repos/TFSoftware/trunk
SVN Revision: 4348
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 17fd259c
......@@ -6,13 +6,15 @@
#
# Configuration file for csback.
#
# this file should be placed in the home directory as file
# This file should be placed in the home directory as file
# ~/.csbackrc
# edit this file to suit your needs
# Edit this file to suit your needs.
#
#
# REVISIONS and CHANGES
# 11/09/2010 V1.0 Daniel Armbruster
# 11/09/2011 V1.0 Daniel Armbruster
# 08/01/2012 V1.1 new configuration file syntax
#
#
# ============================================================================
#
......@@ -22,75 +24,109 @@
# need more information how to install a crontab read the corresponding man
# pages.
#
# An example setting line is given here.
# It's important to know that the entries in a setting line have to be seperated
# with two whitspaces.
# -----------------------------------------------------------------------------
# CRONEXPR SOURCE FLAGS TARGET
# -----------------------------------------------------------------------------
# An example configuration is given bellow:
#
# Example 1)
# [mail]
# cronexpr = @daily
# addresses = example1@email.com, example2@email.com, excample3@email.com
# logging = no
#
# * */10 * * * /data -e *log /data.bak
# [backups]
# keys = backup1, backup2, backup3
#
# This line will perform a backup of /data exluding subdirectories matching the
# pattern *log to /data.bak every ten hours.
# [tests]
# keys = test1, test2
#
# Example 2)
# [backup_backup1]
# cronexpr = * */10 * * *
# srcdir = /data1/
# targetdir = /data1.bak/
# exclude = .*.log$, .*`date '+%j'`$
# logging = no
# test = no
#
# Another possibility is to set up a line as follows, if only a test of a
# special directory (e.g. /data.bak) is wished.
# [backup_backup2]
# cronexpr = * */11 * * *
# srcdir = /data2/
# targetdir = /media/data2.bak/
# recursive = no
# test = yes
# tolerant = yes
# logging = yes
#
# * * */3 * * /data.bak -t -e *log
# [backup_backup3]
# cronexpr = 30 12 * * *
# srcdir = /data3/
# exclude = .*.log$, .*tmp[1-5], ^dirname$
# targetdir = /data3.bak/
# recursive = yes
# followlinks = yes
# test = yes
# tolerant = no
#
# CRONEXPR:
# With the cron expression you're able to schedule your backup. For further
# information how to write cron expressions read the cron man page.
# [test_test1]
# cronexpr = 50 3 * * *
# dir = /data3.bak/
# tolerant = yes
#
# SOURCE:
# The source directory which will be backed up.
# [test_test2]
# cronexpr = @daily
# srcdir = /media/srcdir/
# dir = /data2.bak/
# tolerant = yes
# recursive = no
# logging = no
#
# TARGET:
# The target directory where to locate the files which were backed up.
# -----------------------------------------------------------------------------
# Explanation:
# ============
#
# FLAGS:
# Possible flags are
# [-c] Perform a test of the TARGET and the SOURCE directory.
# Default after executing a backup is only to check the TARGET
# directory for integrity. Using the [-c] flag you have to make
# sure that the filesystem SOURCE is located on isn't readonly.
# Additionally SOURCE must contain a already existing
# checksumfile.
# [-t] Be tolerant. While checking don't report anything if a file
# listed in the checksumfile is missing. This flag is useful if a
# test of a SOURCE directory is executed but SOURCE is realized
# e.g. as a ring buffer.
# [-b] Only perform a backup. First an update of the checksumfile will
# be executed to perform afterwards a backup. A test of the
# TARGET directory won't be executed as well as the [-c] and [-t]
# flags are ignored.
# the integrity of the corresponding directory is desired.
# [-e regexp ] A pattern which contains a regular expression to exclude
# subdirectories of SOURCE matching the regular expression.
# Mail:
# -----
# The [mail] section allows you setting up mail notification. With the cronexpr
# key you are able to adjust when the the program starts or rather how often the
# comma seperated addresses receive mail. With the 'logging' key the logging
# mechanism might be switched on/off.
#
# Note:
# If there is any of the options [-c] [-b] [-t] given a the default is to
# perform a backup including a test of the TARGET directory.
# If no option [-e regexp] is given the whole SOURCE directory will be backed
# up.
# Backups and Tests:
# ------------------
# Next backup sections have to be defined within the [backups] section. If only
# testing a directory is desired the keys must be defined in the [tests]
# section.
#
# Put your setting lines below.
# ----
# Additionally there is the possibility report the current status by sending an
# email to the mailaddresses given below. By default csback will send one email
# per day. If there isn't any mailaddress given csback will skip this option.
# In the following sections the backup and test expression have to be set up.
#
# Backups:
# -------
# cronexpr Cron expression when to run a backup.
# srcdir Directory path to source data.
# targetdir Directory path to backup data.
# exclude Comma seperated regular expressions of files/directories to be
# excluded from the backup.
# recursive Include files of subdirectories. (default yes)
# logging Switch on the logging mechanism to the csback logfiles in
# ~/.csback/log/ . (default yes)
# followlinks Follow softlinks in srcdir. (default no)
# test After backing up the data perform a test. (default yes)
# tolerant While checking don't report anything if a file which is listed is
# missing. (default no)
#
# Tests:
# ------
# cronexpr Cron expression when to perform a test.
# srcdir Directory path containing the files to be checked.
# dir Directory containing the checksumfile. If srcdir is not given then
# srcdir is equal to dir. Dir must contain a csback checksumfile.
# exclude Comma seperated regular expressions matching listed files to be
# excluded from the backup.
# recursive Include files of listed subdirectories. (default yes)
# logging Switch on the logging mechanism to the csback logfiles in
# ~/.csback/log/ . (default yes)
# followlinks Follow softlinks in srcdir. (default no)
# tolerant While checking don't report anything if a file which is listed is
# missing. (default no)
#
#
# Mailadresses should be given as follows (e.g.):
# mail= add1@server1.com add2@server2.com
mail=
# ----- END OF csbackrc -----
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment