Login  Register

Backup Newgenlib database on Ubuntu

Posted by onehomelist on Nov 30, 2011; 5:08am
URL: http://ngl.70.s1.nabble.com/Backup-Newgenlib-database-on-Ubuntu-tp7045646.html

This is what I do:

sudo su postgres

pg_dump newgenlib > ~/newgenlib.sql

This will create a backup file in the home directory

If you want to append date to the backup file then do this:

pg_dump newgenlib > ~/newgenlib_"`date +"%m_%d_%Y"`".sql