1. Postgres – Dump

Example

Dumped File: postgres.20130114_1045.sql

Note:
–inserts and –format=plain is not the fastest option for dumping databases and often leads to slower database imports. It is nonetheless a good option if the database is relatively small (< 1 million records) or if some records are corrupted. Alternative: --format=c. Dump a certain table

2. Postgres – Restore

Redirect Logging to File

Restore a single table

3. Create Databases

4. Drop Databases

5. Execute Query

Example:

6. Drop Extensions

About Gugulethu Ncube

IT enthusiast getting things done.