mirror of
https://github.com/prodrigestivill/docker-postgres-backup-local.git
synced 2026-06-28 14:28:00 +00:00
Update README to fix #54
This commit is contained in:
@@ -128,8 +128,8 @@ zcat backupfile.sql.gz | docker exec --tty --interactive $CONTAINER psql --usern
|
|||||||
|
|
||||||
### Restore to a remote server
|
### Restore to a remote server
|
||||||
|
|
||||||
Replace the backupfile name, `$VERSION`, `$HOSTNAME`, `$PORT`, `$USERNAME` and `$DBNAME` from the following command:
|
Replace `$BACKUPFILE`, `$VERSION`, `$HOSTNAME`, `$PORT`, `$USERNAME` and `$DBNAME` from the following command:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
zcat backupfile.sql.gz | docker run --rm --tty --interactive postgres:$VERSION psql --host=$HOSTNAME --port=$PORT --username=$USERNAME --dbname=$DBNAME -W
|
docker run --rm --tty --interactive -v $BACKUPFILE:/tmp/backupfile.sql.gz postgres:$VERSION /bin/sh -c "zcat /tmp/backupfile.sql.gz | psql --host=$HOSTNAME --port=$PORT --username=$USERNAME --dbname=$DBNAME -W"
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user