Improved Plan B scripts (dumps).

This commit is contained in:
Christian P. MOMON 2023-03-21 00:00:55 +01:00
parent 17d3a40a00
commit d80b2ff72c
1 changed files with 3 additions and 0 deletions

View File

@ -4,6 +4,9 @@ BINDIR=$(dirname "$0")
cd "$BINDIR" cd "$BINDIR"
DUMP_DIR="/var/backups/dumps/" DUMP_DIR="/var/backups/dumps/"
if [ ! -d $DUMP_DIR ]; then
mkdir -p $DUMP_DIR
fi
if [ $(find "$DUMP_DIR" -cmin -120 -type d | wc -l) -eq 0 ]; then if [ $(find "$DUMP_DIR" -cmin -120 -type d | wc -l) -eq 0 ]; then
./dump-psql ./dump-psql