May 2017
Beginner
416 pages
10h 37m
English
Having a backup is pointless unless you have tried to actually replay it. Fortunately, it is easy to do. In case you have created a plain text backup, you can simply take the SQL file and execute it:
psql your_db < your_file.sql
In case you have decided on a custom format or directory format, you can use pg_restore to replay the backup. pg_restore allows you to do all kinds of fancy things such as replaying just a part of a database and so on. In most cases, however, you will simply replay the entire database. In my example, I will create an empty database and just replay a custom format dump:
[hs@linuxpc backup]$ ...
Read now
Unlock full access