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
Copy file name to clipboardExpand all lines: README.md
+10-5
Original file line number
Diff line number
Diff line change
@@ -6,13 +6,13 @@ This project provides Docker images to periodically back up a PostgreSQL databas
6
6
```yaml
7
7
services:
8
8
postgres:
9
-
image: postgres:13
9
+
image: postgres:16
10
10
environment:
11
11
POSTGRES_USER: user
12
12
POSTGRES_PASSWORD: password
13
13
14
14
backup:
15
-
image: eeshugerman/postgres-backup-s3:15
15
+
image: eeshugerman/postgres-backup-s3:16
16
16
environment:
17
17
SCHEDULE: '@weekly'# optional
18
18
BACKUP_KEEP_DAYS: 7# optional
@@ -28,20 +28,25 @@ services:
28
28
POSTGRES_PASSWORD: password
29
29
```
30
30
31
-
- Images are tagged by the major PostgreSQL version supported: `11`, `12`, `13`, `14`, or `15`.
31
+
- Images are tagged by the major PostgreSQL version supported: `12`, `13`, `14`, `15` or `16`.
32
32
- 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
33
- If `PASSPHRASE` is provided, the backup will be encrypted using GPG.
34
34
- Run `docker exec <container name> sh backup.sh` to trigger a backup ad-hoc.
35
35
- If `BACKUP_KEEP_DAYS` is set, backups older than this many days will be deleted from S3.
36
36
- Set `S3_ENDPOINT` if you're using a non-AWS S3-compatible storage provider.
37
37
38
38
## Restore
39
-
> **WARNING:** DATA LOSS! All database objects will be dropped and re-created.
39
+
> [!CAUTION]
40
+
> DATA LOSS! All database objects will be dropped and re-created.
41
+
40
42
### ... from latest backup
41
43
```sh
42
44
docker exec <container name> sh restore.sh
43
45
```
44
-
> **NOTE:** If your bucket has more than a 1000 files, the latest may not be restored -- only one S3 `ls` command is used
46
+
47
+
> [!NOTE]
48
+
> If your bucket has more than a 1000 files, the latest may not be restored -- only one S3 `ls` command is used
49
+
45
50
### ... from specific backup
46
51
```sh
47
52
docker exec <container name> sh restore.sh <timestamp>
0 commit comments