forked from kartoza/docker-pg-backup
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request kartoza#25 from gis-ops/master
Change cron logic to use /var/spool/crontabs
- Loading branch information
Showing
3 changed files
with
9 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,12 @@ | ||
FROM kartoza/postgis:11.0-2.5 | ||
MAINTAINER [email protected] | ||
|
||
RUN apt-get -y update; apt-get install -y postgresql-client | ||
ADD backups-cron /etc/cron.d/backups-cron | ||
RUN touch /var/log/cron.log | ||
ADD backups.sh /backups.sh | ||
ADD restore.sh /restore.sh | ||
ADD start.sh /start.sh | ||
|
||
ENTRYPOINT [] | ||
CMD ["/start.sh"] | ||
COPY backups-cron /backups-cron | ||
COPY backups.sh /backups.sh | ||
COPY restore.sh /restore.sh | ||
COPY start.sh /start.sh | ||
|
||
ENTRYPOINT ["/bin/bash", "/start.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# For testing - run every minute | ||
#*/1 * * * * root /backups.sh 2>&1 | ||
*/1 * * * * /backups.sh 2>&1 | ||
|
||
# Run the backups at 11pm each night | ||
0 23 * * * root /backups.sh 2>&1 | ||
0 23 * * * /backups.sh 2>&1 | ||
|
||
# We need a blank line here for it to be a valid cron file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters