From 49c6b546178181d3ce361a248f01574afd6a4703 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 19 Dec 2024 12:47:54 +0300 Subject: [PATCH] fix: backup bash script --- backup.sh | 2 +- setup_backup_cron.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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"