Backup Newgenlib database on Ubuntu

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Backup Newgenlib database on Ubuntu

onehomelist
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