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
+29-16Lines changed: 29 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,27 +8,27 @@ Service to backup and/or restore a PostgreSQL database using S3
8
8
4. Run a backup and check your bucket for that backup
9
9
10
10
### Environment variables
11
-
`MODE=[backup|restore]`
11
+
`MODE` Valid values: `backup`, `restore`
12
12
13
-
`DB_HOST=` hostname of the database server
13
+
`DB_HOST` hostname of the database server
14
14
15
-
`DB_NAME=` name of the database
15
+
`DB_NAME` name of the database
16
16
17
-
`DB_OPTIONS=opt1 opt2 opt3 ...` optional arguments to supply to the backup or restore commands
17
+
`DB_OPTIONS` optional arguments to supply to the backup or restore commands
18
18
19
-
`DB_ROOTPASSWORD=` password for the `DB_ROOTUSER`
19
+
`DB_ROOTPASSWORD` password for the `DB_ROOTUSER`
20
20
21
-
`DB_ROOTUSER=` database administrative user, typically "postgres" for PostgreSQL databases
21
+
`DB_ROOTUSER` database administrative user, typically "postgres" for PostgreSQL databases
22
22
23
-
`DB_USERPASSWORD=` password for the `DB_USER`
23
+
`DB_USERPASSWORD` password for the `DB_USER`
24
24
25
-
`DB_USER=` user that accesses the database (PostgreSQL "role")
25
+
`DB_USER` user that accesses the database (PostgreSQL "role")
26
26
27
-
`AWS_ACCESS_KEY=` used for S3 interactions
27
+
`AWS_ACCESS_KEY` used for S3 interactions
28
28
29
-
`AWS_SECRET_KEY=` used for S3 interactions
29
+
`AWS_SECRET_KEY` used for S3 interactions
30
30
31
-
`S3_BUCKET=`_e.g., s3://database-backups_**NOTE: no trailing slash**
31
+
`S3_BUCKET` e.g., _s3://database-backups_**NOTE: no trailing slash**
32
32
33
33
>**It's recommended that your S3 bucket have versioning turned on.**
34
34
@@ -38,9 +38,22 @@ This image is built automatically on Docker Hub as [silintl/postgresql-backup-re
38
38
## Playing with it locally
39
39
You'll need [Docker](https://www.docker.com/get-docker), [Docker Compose](https://docs.docker.com/compose/install/), and [Make](https://www.gnu.org/software/make/).
40
40
41
-
1.`cp local.env.dist local.env` and supply variables
42
-
2. Ensure you have a `gz` dump in your S3 bucket to be used for testing. A test database is provided as part of this project in the `test` folder. You can copy it to S3 as follows:
41
+
1. Copy `local.env.dist` to `local.env`.
42
+
2. Edit `local.env` to supply values for the variables.
43
+
3. Ensure you have a `gz` dump in your S3 bucket to be used for testing. A test database is provided as part of this project in the `test` folder. You can copy it to S3 as follows:
0 commit comments