Better cron for backups.
This commit is contained in:
parent
16a1bcaef8
commit
7ecb234072
|
@ -1,5 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo "\n\n`date +"%Y-%m-%d-%H%M"` Starting a DB backup.\n"
|
||||||
|
|
||||||
# Get current script directory (pwd doesn't cut it)
|
# Get current script directory (pwd doesn't cut it)
|
||||||
csd=$(cd -P -- "$(dirname -- "$0")" && pwd -P)
|
csd=$(cd -P -- "$(dirname -- "$0")" && pwd -P)
|
||||||
# Set the environment. We only grab the entries we need because otherwise we
|
# Set the environment. We only grab the entries we need because otherwise we
|
||||||
|
|
|
@ -2,3 +2,4 @@
|
||||||
0 0,8,16 * * * /home/user/skynet-webportal/setup-scripts/log-checker.py /home/user/skynet-webportal/.env sia 8
|
0 0,8,16 * * * /home/user/skynet-webportal/setup-scripts/log-checker.py /home/user/skynet-webportal/.env sia 8
|
||||||
0 * * * * /home/user/skynet-webportal/setup-scripts/health-checker.py /home/user/skynet-webportal/.env sia 1
|
0 * * * * /home/user/skynet-webportal/setup-scripts/health-checker.py /home/user/skynet-webportal/.env sia 1
|
||||||
30 */4 * * * /home/user/skynet-webportal/setup-scripts/blocklist-airtable.py /home/user/skynet-webportal/.env
|
30 */4 * * * /home/user/skynet-webportal/setup-scripts/blocklist-airtable.py /home/user/skynet-webportal/.env
|
||||||
|
0 4 * * * /home/user/skynet-webportal/scripts/db_backup.sh 1 >> /home/user/skynet-webportal/logs/db_backup_`date +"%Y-%m-%d-%H%M"`.log 2 > &1
|
||||||
|
|
Reference in New Issue