Skip to content
Snippets Groups Projects
Commit f5b06149 authored by Daniel's avatar Daniel
Browse files

MAINT: Moved `backup.sh` into `utils` directory

parent c2da7cf0
No related branches found
No related tags found
No related merge requests found
......@@ -26,7 +26,7 @@
# The directory which the dump is to be stored to. Do not change it here. Use
# the --backupdir=./my/dir/ option or an environment variable instead.
BACKUPDIR="${BACKUPDIR:-./backup}"
BACKUPDIR="${BACKUPDIR:-../backup}"
# Iff this (environment) variable is "true" as lower-case, then this script also
# outputs a machine readable status report. The variable can also be set by
# giving the `--yaml` command line option.
......@@ -59,10 +59,10 @@ EOF
# Config and command line parameter loading ###################################
. .config
. ../.config
# load useful stuff - parses the commandline parameters and so on...
. patches/utils/patch_header.sh
. ../patches/utils/patch_header.sh
echo "BACKUPDIR: $BACKUPDIR"
echo "YAML: $YAML"
......@@ -105,7 +105,7 @@ function yaml_success() {
#rm dumpfile.tmp
# create backup dir if not exists
[ -d "$BACKUPDIR" ] || mkdir "$BACKUPDIR" ||
mkdir -p "$BACKUPDIR"
DATE=$(date -u --rfc-3339=ns | sed 's/ /T/g')
BACKUPFILE=${BACKUPDIR}/${DATABASE_NAME}.${DATE}.dump.sql
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment