# 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.
# the the environment variable instead.
BACKUPDIR="${BACKUPDIR:-../backup}"
PRINT_HELP="--backupdir=BACKUPDIR\n\tThe directory which the dump is to be stored to. (Defaults to ./backup,\n\tcan also be set as an environment variable.)\n"
# Load settings from .config and defaults #####################################
.$UTILSPATH/load_settings.sh
...
...
@@ -42,31 +41,23 @@ PRINT_HELP="--backupdir=BACKUPDIR\n\tThe directory which the dump is to be store
.$UTILSPATH/helpers.sh
function backup(){
NARG_NAME="$1"
NARG_FILE="$2"
shift 2
# parameters: connection, database, outfile
if[-e"$NARG_FILE"];then
failure "dumpfile already exists."
fi
echo"Dumping database $NARG_NAME to $NARG_FILE ... "