How to dump and restore a postgresql database
Tech-Today

How to dump and restore a postgresql database


To create a postgresql dump in linux, execute the following commands:

  1. Login as root user
  2. >su - postgres
  3. >pg_dump -U username -W -Z 9 -f /tmp/dump_username.dump.zip -h 127.0.0.1 dbname
  4. >password
To restore, execute:
  1. >psql -U username -f dump_username.dump dbname
Other ways:
>pg_dump -U <username> -W -Z 9 -f /outfile.dump.zip -h 127.0.0.1 <dbname>
><password>

//to restore
>psql -U <username> -f <infile> <dbname>




- How To Import And Export A Database Dump In Oracle
The following instruction will help us in importing and exporting our oracle database. Create and restore dump file (http://www.database.fi/2011/05/using-expdp-and-impdp-export-and-import-in-10g-11g/)Create dump filesqlplus system/oracleSQL> create...

- Database
MSSQLMSSQL equivalent of DESC in MYSQLPostgresqlChange postgresql's postgres passwordHow to install hstore in postgresql 9.1JDBC provider setting in java for postgresql, mysql and oracleHow to alter the sequence value in postgresqlOracleHow to change...

- Change Postgresql's Postgres Password
This is how you would change your postgresql's user postgres password, in case you forgot it. This is done in ubuntu 12.04. 1.) Logon to your postgres account in behalf of root: >sudo -u postgres psql template1 //enter your password Now you're...

- Magento Sqlstate[hy000] [2013] Lost Connection To Mysql Server
I have this unusual error when I printed the error caught in Mage::run method. I've already setup my database connection settings in app/etc/local.xml, but unfortunately I still have this error. What I found out was there is another configuration...

- How To Change The Database Setting In Magento
The magento's database settings is stored in this file: app/etc/local.xml you would find something like this: <default_setup> <connection> <host><![CDATA[localhost]]></host> <username><![CDATA[username]]></username>...



Tech-Today








.