From 57f93492aa3e29b01427acc58ab7f8f93ab31be5 Mon Sep 17 00:00:00 2001 From: Dave Lane Date: Thu, 10 Oct 2019 02:57:41 +0000 Subject: [PATCH] updated script to work in new location closer to Mastodon code --- .gitignore | 2 +- dbbackup-cron | 12 ++++++------ dbbackup-docker-compose | 2 +- default-docker-compose.conf | 19 ------------------- 4 files changed, 8 insertions(+), 27 deletions(-) delete mode 100644 default-docker-compose.conf diff --git a/.gitignore b/.gitignore index 6c5ddb6..fee9217 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -default-docker-compose.conf +*.conf diff --git a/dbbackup-cron b/dbbackup-cron index ef9d0c7..4b50a2c 100644 --- a/dbbackup-cron +++ b/dbbackup-cron @@ -1,20 +1,20 @@ -SHELL=/bin/sh +SHELL=/bin/bash PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin # # run system backups # # hourly - at 5 minutes past mon-sat -05 * * * * root /etc/dbbackup/dbbackup-docker-compose --hourly +25 * * * * root /home/data/mastodon.oeru.org/scripts/dbbackup/dbbackup-docker-compose -c /home/data/mastodon.oeru.org/scripts/dbbackup/mastodon.conf --hourly # # daily - at 7:30 pm, mon-sat -30 19 * * * root /etc/dbbackup/dbbackup-docker-compose --daily +30 19 * * * root /home/data/mastodon.oeru.org/scripts/dbbackup/dbbackup-docker-compose -c /home/data/mastodon.oeru.org/scripts/dbbackup/mastodon.conf --daily # # weekly - at 7:30 pm, sun -30 19 * * sun root /etc/dbbackup/dbbackup-docker-compose --weekly +30 19 * * sun root /home/data/mastodon.oeru.org/scripts/dbbackup/dbbackup-docker-compose -c /home/data/mastodon.oeru.org/scripts/dbbackup/mastodon.conf --weekly # # monthly - at 8:30 pm, on the first of the last of the month -30 20 1 * * root /etc/dbbackup/dbbackup-docker-compose --monthly +30 20 1 * * root /home/data/mastodon.oeru.org/scripts/dbbackup/dbbackup-docker-compose -c /home/data/mastodon.oeru.org/scripts/dbbackup/mastodon.conf --monthly # # yearly - at 8:30 pm, on the first of January. -30 20 1 1 * root /etc/dbbackup/dbbackup-docker-compose --yearly +30 20 1 1 * root /home/data/mastodon.oeru.org/scripts/dbbackup/dbbackup-docker-compose -c /home/data/mastodon.oeru.org/scripts/dbbackup/mastodon.conf--yearly diff --git a/dbbackup-docker-compose b/dbbackup-docker-compose index e9ec0c2..a44cc57 100755 --- a/dbbackup-docker-compose +++ b/dbbackup-docker-compose @@ -29,7 +29,7 @@ VERBOSE=0 # # Stuff that should be universal for this install... # where we can find this app... -MAIN_DIR=/etc/dbbackup +#MAIN_DIR=`pwd` # determine today's date DATE=`date '+%Y-%m-%d-%a'` # determine today's date diff --git a/default-docker-compose.conf b/default-docker-compose.conf deleted file mode 100644 index 0e4c8d2..0000000 --- a/default-docker-compose.conf +++ /dev/null @@ -1,19 +0,0 @@ -# -# SQL dump backup directory -# -BU_DIR=/home/data/mastodon/backup -# -# Docker Compose details -# -# dir containing the docker-compose.yml -DC_DIR=/home/docker/mastodon -# name of the database container -DC_CONTAINER=postgres -# Command to dump the relevant database(s) -DUMP_CMD='pg_dumpall -c -U postgres' -# -# Reporting -# -# email address to send reports to, and subject -EMAIL=webmaster@oerfoundation.org -EMAIL_SUBJ="Mastodon on OERu Open Postgres Backup Report"