mirror of
https://github.com/prodrigestivill/docker-postgres-backup-local.git
synced 2026-05-31 08:37:58 +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
|
||||
|
||||
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
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user