Skip to content
Snippets Groups Projects
Commit 5311ecca authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

move settings for localdump into backup.job

parent 526c3c00
No related branches found
No related tags found
1 merge request!7move configs for localdump
......@@ -91,11 +91,10 @@ then use the **root** user and follow these steps:
### database backup: set local backup target ###
Create a **jobs/dirs.job** (copy the deliverers *.dist file)
Create a **jobs/dirs.job** (copy the delivered *.dist file)
cd jobs
cp dirs.job.dist dirs.job
cd ..
cp backup.job.dist backup.job
There are 2 defaults:
......
......@@ -114,8 +114,8 @@ eofbanner
function j_getDirs2Backup(){
STORAGE_SAMBASHARES=`_j_getvar ${STORAGEFILE} "sambashares"`
_j_getvar ${DIRFILE} dir-localdumps
_j_getvar ${DIRFILE} dir-dbarchive
_j_getvar ${JOBFILE} dir-localdumps
_j_getvar ${JOBFILE} dir-dbarchive
_j_getvar ${DIRFILE} include
# get dirs of filesets, i.e.
......
......@@ -43,4 +43,17 @@ auto = 1M
start-time-inc = 20:00
start-time-full = 20:00
# ----------------------------------------------------------------------
# local dumps; each service has its own subdir there
# this entry is mapped to BACKUP_TARGETDIR in "localdump.sh"
# dir is set by puppet
# ----------------------------------------------------------------------
dir-localdumps = /var/localdumps/backup
keep-days = 7
# archive databases (to keep deleted schemes or databases that
# are not backupped anymore; couchdb2 feature)
dir-dbarchive = /var/localdumps/archive
# ----------------------------------------------------------------------
......@@ -16,18 +16,6 @@
# ----------------------------------------------------------------------
# ----------------------------------------------------------------------
# target directory for local dumps;
# each datbase service has its own subdir there
# this entry is mapped to BACKUP_TARGETDIR in "localdump.sh"
# ----------------------------------------------------------------------
dir-localdumps = /var/localdumps/backup
keep-days = 7
# archive databases (to keep deleted schemes or databases that
# are not backupped anymore; couchdb2 feature)
dir-dbarchive = /var/localdumps/archive
# ----------------------------------------------------------------------
# directory list to transfer
# without ending "/"
......
......@@ -27,20 +27,27 @@
. ~/.backup.conf
fi
BACKUP_BASEDIR=`_j_getvar ${DIRFILE} "dir-localdumps"`
if [ ! -r "${DIRFILE}" ]; then
color error
echo ERROR: missing config file ${DIRFILE}.
color reset
exit 1
fi
BACKUP_BASEDIR=`_j_getvar ${JOBFILE} "dir-localdumps"`
BACKUP_PLUGINDIR=`dirname $0`/plugins/localdump
# check
if [ -z $BACKUP_BASEDIR ]; then
if [ -z "$BACKUP_BASEDIR" ]; then
color error
echo ERROR: missing config for backup target.
echo There must be an entry dir-localdumps in ${DIRFILE}
echo There must be an entry dir-localdumps in ${JOBFILE}
color reset
exit 1
fi
# CLEANUP AFTER N DAYS...
typeset -i BACKUP_KEEP_DAYS=`_j_getvar ${DIRFILE} "keep-days"`
typeset -i BACKUP_KEEP_DAYS=`_j_getvar ${JOBFILE} "keep-days"`
if [ $BACKUP_KEEP_DAYS -eq 0 ]; then
BACKUP_KEEP_DAYS = 7
......
......@@ -13,7 +13,7 @@ They will be sourced by [APPDIR]/localdump.sh and cannot started directly.
(*) If ever possible we use a zero config method. This plugin detects locally installed binaries
and running processes of a given name to run a database backup or not.
See settings in `[APPDIR]/jobs/dirs.job`:
See settings in `[APPDIR]/jobs/backup.job`:
```text
dir-localdumps = /var/iml-backup
......
......@@ -172,7 +172,7 @@
if [ "$1" = "dumps" ]; then
sDirs2Backup="`_j_getvar ${DIRFILE} dir-localdumps`"
sDirs2Backup="`_j_getvar ${JOBFILE} dir-localdumps`"
else
sDirs2Backup="`j_getDirs2Backup`"
fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment