mirror of
https://github.com/prodrigestivill/docker-postgres-backup-local.git
synced 2026-07-06 18:28:03 +00:00
Improved manual backup example
This commit is contained in:
@@ -90,10 +90,12 @@ This variables are not intended to be used for normal deployment operations:
|
|||||||
|
|
||||||
### Manual Backups
|
### Manual Backups
|
||||||
|
|
||||||
By default this container makes daily backups, but you can start a manual backup by running `/backup.sh`:
|
By default this container makes daily backups, but you can start a manual backup by running `/backup.sh`.
|
||||||
|
|
||||||
|
This script as example creates one backup as the running user and saves it the working folder.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
docker run -u postgres:postgres -e POSTGRES_HOST=postgres -e POSTGRES_DB=dbname -e POSTGRES_USER=user -e POSTGRES_PASSWORD=password prodrigestivill/postgres-backup-local /backup.sh
|
docker run --rm -v "$PWD:/backups" -u "$(id -u):$(id -g)" -e POSTGRES_HOST=postgres -e POSTGRES_DB=dbname -e POSTGRES_USER=user -e POSTGRES_PASSWORD=password prodrigestivill/postgres-backup-local /backup.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
### Automatic Periodic Backups
|
### Automatic Periodic Backups
|
||||||
|
|||||||
Reference in New Issue
Block a user