Skip to content

Commit bfd0466

Browse files
authored
Update backup-restore.md
1 parent d93fd88 commit bfd0466

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

postgresql/backup-restore.md

+6
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@ If admin privileges are needed:
3838
sudo -u postgres pg_restore --format=custom --dbname=my_database output.sql
3939
```
4040

41+
If admin privileges are needed but `sudo` is not available:
42+
43+
```shell
44+
pg_restore -U postgres --format=custom --dbname=my_database output.sql
45+
```
46+
4147
If importing into a database owned by another user, don't emit owner statements:
4248

4349
```shell

0 commit comments

Comments
 (0)