Quantcast
Channel: Enterprise Ready Global Remote Linux, Unix System Support. - Scripts Installation and Upgrade
Viewing all articles
Browse latest Browse all 7

Back up your Drupal database with PostgreSQL

$
0
0

Back up your Drupal database with PostgreSQL

There several ways to do a database backup. E.g.,

pg_dump -U [user] -h [host] [databasename] > dump.sql

or

pg_dump -U [user] -W -h [host] [databasename] -F c > dump.pg_restore.format

The former you can restore by running the script with psql, the latter by using the pg_restore utility.

For huge databases, the second method is nice because it is automatically compressed. Alternatively, pipe to gzip:

pg_dump -U [user] -W -h [host] [databasename] | gzip -c > dump.sql.gz

and to restore:

gunzip -c dump.sql.gz | psql [options]


Viewing all articles
Browse latest Browse all 7

Latest Images

Trending Articles





Latest Images