PostgreSQL database backup-restore

Postgresql database backups and restore

In this article how to dul postgresql database backup and restore. Something easier to do than to say.

First you need to play the role of user with privileges in the db. Typically ' root ' is not enabled.

Then:

# su postgres
$ cd
$ pg_dump dump db_to_be_dumped > dumpfile.

Now you have the dump database "db_to_be_dumped" in the user's home directory postgres.

To restore must be performed, always as an administrator user of db:

$ psql db_to_be_restored <. dump dumpfile

Glossary

Postgresql.org wiki from great tips for system engineering aspects: invitation to look with this link: http://wiki.postgresql.org/wiki/Automated_Backup_on_Linux 

It's all.

Lascia un commento

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *

Un progetto da realizzare?

Start up, think tank, idee da sviluppare in sistemi e software ...
angular
Python

© ICT360. All rights reserved. Powered by ICT360.