mirror of
https://github.com/fradelg/docker-mysql-cron-backup.git
synced 2024-11-01 00:21:46 +01:00
fix minor issues
This commit is contained in:
parent
1f5f594e14
commit
d6217926f2
3 changed files with 3 additions and 4 deletions
2
Makefile
2
Makefile
|
@ -6,7 +6,7 @@ test:
|
||||||
# Checking for syntax errors
|
# Checking for syntax errors
|
||||||
set -e; for SCRIPT in *.sh; \
|
set -e; for SCRIPT in *.sh; \
|
||||||
do \
|
do \
|
||||||
sh -n $$SCRIPT; \
|
bash -n $$SCRIPT; \
|
||||||
done
|
done
|
||||||
|
|
||||||
# Checking for bashisms (currently not failing, but only listing)
|
# Checking for bashisms (currently not failing, but only listing)
|
||||||
|
|
|
@ -47,7 +47,7 @@ do
|
||||||
if [ -n "$MAX_BACKUPS" ]
|
if [ -n "$MAX_BACKUPS" ]
|
||||||
then
|
then
|
||||||
# Execute the delete script, delete older backup or other custom delete script
|
# Execute the delete script, delete older backup or other custom delete script
|
||||||
/delete.sh $db $EXT
|
/delete.sh "$db" $EXT
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
rm -rf "$FILENAME"
|
rm -rf "$FILENAME"
|
||||||
|
|
3
run.sh
3
run.sh
|
@ -16,9 +16,8 @@ elif [ -n "${INIT_RESTORE_LATEST}" ]; then
|
||||||
find /backup -maxdepth 1 -name '[0-9]*.*.sql.gz' | sort | tail -1 | xargs /restore.sh
|
find /backup -maxdepth 1 -name '[0-9]*.*.sql.gz' | sort | tail -1 | xargs /restore.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
function final_backup () {
|
function final_backup {
|
||||||
echo "=> Captured trap for final backup"
|
echo "=> Captured trap for final backup"
|
||||||
DATE=$(date +%Y%m%d%H%M)
|
|
||||||
echo "=> Requested last backup at $(date "+%Y-%m-%d %H:%M:%S")"
|
echo "=> Requested last backup at $(date "+%Y-%m-%d %H:%M:%S")"
|
||||||
exec /backup.sh
|
exec /backup.sh
|
||||||
exit 0
|
exit 0
|
||||||
|
|
Loading…
Reference in a new issue