466 B
466 B
pg_restore has 2 modes. if you just feed it a backup file it produces sql that you woudl have to pipe to psql or a file to run. If you specify -d it will actually connect and execute the restore commands.
-C combined with -c will drop and create a new database to restore into -O will not assign ownership to the original owner, but whoever is connecting instead
sample restore command:
pg_restore -O -C -c -U ptrowbridge -p 5433 -d ubm -h localhost ubm.backup