diff --git a/backup.sh b/backup.sh index 0cda24b..ea6cc81 100755 --- a/backup.sh +++ b/backup.sh @@ -1,2 +1,2 @@ -docker exec d4dd199a4566 pg_dump -U postgres postgres > $(pwd)/backups/$(date -d "today" +"%Y-%m-%d-%H-%M").sql +docker exec d4dd199a4566 pg_dump -U postgres postgres > /root/gadasin/backups/$(date -d "today" +"%Y-%m-%d-%H-%M").sql diff --git a/setup_backup_cron.sh b/setup_backup_cron.sh index 1894103..dc2ef08 100755 --- a/setup_backup_cron.sh +++ b/setup_backup_cron.sh @@ -1,4 +1,4 @@ mkdir backups -(crontab -l 2>/dev/null; echo "* 4 * * * $(pwd)/backup.sh") | crontab - +(crontab -l 2>/dev/null; echo "0 4 * * * $(pwd)/backup.sh") | crontab - echo "Success"