You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 21, 2025. It is now read-only.
This project provides Docker images to periodically back up a PostgreSQL database to AWS S3, and to restore from the backup as needed.
2
+
3
+
This is a blatant fork of https://github.com/eeshugerman/postgres-backup-s3 which was itself a fork and re-structuring of @schickling's [postgres-backup-s3](https://github.com/schickling/dockerfiles/tree/master/postgres-backup-s3) and [postgres-restore-s3](https://github.com/schickling/dockerfiles/tree/master/postgres-restore-s3).
4
+
5
+
It was archived and I still relied on it. Plus I needed PG 18.
6
+
7
+
# Building the image
8
+
9
+
Obviously replace `miharekar` with your dockerhub username and `18.0` with the desired PostgreSQL version.
- Images are tagged by the major PostgreSQL version supported: `12`, `13`, `14`, `15` or `16`.
32
36
- The `SCHEDULE` variable determines backup frequency. See go-cron schedules documentation [here](http://godoc.org/github.com/robfig/cron#hdr-Predefined_schedules). Omit to run the backup immediately and then exit.
33
37
- If `PASSPHRASE` is provided, the backup will be encrypted using GPG.
34
38
- Run `docker exec <container name> sh backup.sh` to trigger a backup ad-hoc.
@@ -52,30 +56,16 @@ docker exec <container name> sh restore.sh
52
56
docker exec <container name> sh restore.sh <timestamp>
## Run a simple test environment with Docker Compose
62
-
```sh
63
-
cp template.env .env
64
-
# fill out your secrets/params in .env
65
-
docker compose up -d
66
-
```
67
-
68
59
# Acknowledgements
69
-
This project is a fork and re-structuring of @schickling's [postgres-backup-s3](https://github.com/schickling/dockerfiles/tree/master/postgres-backup-s3) and [postgres-restore-s3](https://github.com/schickling/dockerfiles/tree/master/postgres-restore-s3).
70
60
71
-
## Fork goals
72
-
These changes would have been difficult or impossible merge into @schickling's repo or similarly-structured forks.
61
+
As mentioned above, this project is a blatant fork of https://github.com/eeshugerman/postgres-backup-s3
62
+
63
+
As is the following text documenting the changes from the @schickling's [postgres-backup-s3](https://github.com/schickling/dockerfiles/tree/master/postgres-backup-s3):
64
+
73
65
- dedicated repository
74
66
- automated builds
75
67
- support multiple PostgreSQL versions
76
68
- backup and restore with one image
77
-
78
-
## Other changes and features
79
69
- some environment variables renamed or removed
80
70
- uses `pg_dump`'s `custom` format (see [docs](https://www.postgresql.org/docs/10/app-pgdump.html))
81
71
- drop and re-create all database objects on restore
@@ -85,3 +75,5 @@ These changes would have been difficult or impossible merge into @schickling's r
85
75
- support encrypted (password-protected) backups
86
76
- support for restoring from a specific backup by timestamp
87
77
- support for auto-removal of old backups
78
+
79
+
What's new in my fork is solely support for later versions of PostgreSQL.
0 commit comments