Skip to content
This repository was archived by the owner on Jun 21, 2025. It is now read-only.

Commit 376c3f7

Browse files
committed
OG project was archived so take control of my fork
1 parent 5e37e75 commit 376c3f7

File tree

7 files changed

+20
-113
lines changed

7 files changed

+20
-113
lines changed

.dir-locals.el

Lines changed: 0 additions & 4 deletions
This file was deleted.

.github/workflows/build-and-push-images.yml

Lines changed: 0 additions & 47 deletions
This file was deleted.

.gitignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2017 Johannes Schickling
3+
Copyright (c) 2017 Johannes Schickling, Elliott Shugerman, and Miha Rekar
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 19 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
11
# Introduction
2-
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.
10+
11+
```
12+
❯ docker build -t miharekar/postgres-backup-s3:18.0 --build-arg POSTGRES_VERSION='18.0' . && docker push miharekar/postgres-backup-s3:18.0
13+
```
314

415
# Usage
516
## Backup
617
```yaml
718
services:
8-
postgres:
9-
image: postgres:16
10-
environment:
11-
POSTGRES_USER: user
12-
POSTGRES_PASSWORD: password
13-
1419
backup:
15-
image: eeshugerman/postgres-backup-s3:16
20+
image: miharekar/postgres-backup-s3:18.0
1621
environment:
1722
SCHEDULE: '@weekly' # optional
1823
BACKUP_KEEP_DAYS: 7 # optional
@@ -28,7 +33,6 @@ services:
2833
POSTGRES_PASSWORD: password
2934
```
3035
31-
- Images are tagged by the major PostgreSQL version supported: `12`, `13`, `14`, `15` or `16`.
3236
- 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.
3337
- If `PASSPHRASE` is provided, the backup will be encrypted using GPG.
3438
- 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
5256
docker exec <container name> sh restore.sh <timestamp>
5357
```
5458

55-
# Development
56-
## Build the image locally
57-
`POSTGRES_VERSION` determines Postgres version.
58-
```sh
59-
DOCKER_BUILDKIT=1 docker build --build-arg POSTGRES_VERSION=17 .
60-
```
61-
## 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-
6859
# 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).
7060

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+
7365
- dedicated repository
7466
- automated builds
7567
- support multiple PostgreSQL versions
7668
- backup and restore with one image
77-
78-
## Other changes and features
7969
- some environment variables renamed or removed
8070
- uses `pg_dump`'s `custom` format (see [docs](https://www.postgresql.org/docs/10/app-pgdump.html))
8171
- 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
8575
- support encrypted (password-protected) backups
8676
- support for restoring from a specific backup by timestamp
8777
- support for auto-removal of old backups
78+
79+
What's new in my fork is solely support for later versions of PostgreSQL.

docker-compose.yaml

Lines changed: 0 additions & 28 deletions
This file was deleted.

template.env

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)