PostgreSQL Backup: Unterschied zwischen den Versionen

Aus Tutorials
Zur Navigation springen Zur Suche springen
Zeile 36: Zeile 36:


[https://www.postgresql.org/docs/9.1/backup-dump.html https://www.postgresql.org/docs/9.1/backup-dump.html]
[https://www.postgresql.org/docs/9.1/backup-dump.html https://www.postgresql.org/docs/9.1/backup-dump.html]
[http://postgresguide.com/utilities/backup-restore.html http://postgresguide.com/utilities/backup-restore.html]


[https://www.postgresql.org/docs/9.3/app-pgdump.html https://www.postgresql.org/docs/9.3/app-pgdump.html]
[https://www.postgresql.org/docs/9.3/app-pgdump.html https://www.postgresql.org/docs/9.3/app-pgdump.html]
[https://dba.stackexchange.com/questions/161857/how-to-backup-restore-in-postgresql-pgadmin-4 https://dba.stackexchange.com/questions/161857/how-to-backup-restore-in-postgresql-pgadmin-4]




Zurück zu [[PostgreSQL#Backup erstellen und Restore|PostgreSQL]]
Zurück zu [[PostgreSQL#Backup erstellen und Restore|PostgreSQL]]

Version vom 10. Juni 2019, 11:12 Uhr

Backup

im SQL-Format

pg_dump [-h 10.2.0.123] -U postgres <database> > <file name>

komprimiert

pg_dump [-h 10.2.0.123] -U postgres -Fc testdb > testdb.dump

Restore

im SQL-Format

psql -h 10.2.0.123 -U postgres -d <database> -f <file>

bzw.

psql -h 10.2.0.123 -U postgres <database> < <file>

komprimiert

pg_restore [-h 10.2.0.123] -U postgres -d <database> <file name>

Links

https://www.postgresql.org/docs/9.1/backup-dump.html

https://www.postgresql.org/docs/9.3/app-pgdump.html


Zurück zu PostgreSQL