Well, here's what I use to snapshot the database every night:

  /usr/bin/pg_dump -Ft -b dspace | gzip -9 > /var/lib/idea/db.tar.gz

Change the names and paths to suit your envorinment, of course.  The
result should be suitable for loading with 'pg_restore'.  It will
*not* include your database users, groups, and GRANTs, however, so
you'll have to set those up manually before restoring.  You can use
the Pg superuser account or the database account that DSpace uses, as
the database user ("-U someuser") to run pg_dump.  This method dumps
only the single database "dspace" -- change the name in the command if
you called it something else.

Another way, if you want to copy the entire database cluster
(databases, roles, GRANTs, and all) would be:

  pg_dumpall > db.sql

This will produce a plain SQL script that should load everything you
had into the new database when fed to 'psql' thus:

  psql -f db.sql

Run both of these as the Pg superuser.  ("-U postgres" or whatever)

-- 
Mark H. Wood, Lead System Programmer   [email protected]
Friends don't let friends publish revisable-form documents.

Attachment: pgp92wcaXKPnB.pgp
Description: PGP signature

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to