Thread: Importing dump
I'm trying my chances here with PostgreSQL, I've used MySQL mostly... I did a pg_dumpall and now want to import the file... Where MySQL I can do mysql -u admin -p < dump.sql how I would I mimick this with PostreSQL? The dump comes from 7.1 and I'm trying to import into 7.4 Also, how can I dump a specific database? Example, with MySQL I can do mysqldump -u admin -p --database gforge > dump.sql -Jonathan
On Mon, Jul 25, 2005 at 11:15:48AM -0500, Jonathan Villa wrote: > I'm trying my chances here with PostgreSQL, I've used MySQL mostly... > > I did a pg_dumpall and now want to import the file... > > Where MySQL I can do mysql -u admin -p < dump.sql how I would I mimick this with > PostreSQL? See the "Backup and Restore" chapter of the documentation and the manual page for psql: http://www.postgresql.org/docs/7.4/static/backup.html http://www.postgresql.org/docs/7.4/static/app-psql.html > The dump comes from 7.1 and I'm trying to import into 7.4 > > Also, how can I dump a specific database? > Example, with MySQL I can do mysqldump -u admin -p --database gforge > dump.sql See the "Backup and Restore" chapter mentioned above and the documentation for pg_dump: http://www.postgresql.org/docs/7.4/static/app-pgdump.html -- Michael Fuhr http://www.fuhr.org/~mfuhr/