Re: Copying a database
От | Guillaume Lelarge |
---|---|
Тема | Re: Copying a database |
Дата | |
Msg-id | 4C64D8E6.7010302@lelarge.info обсуждение исходный текст |
Ответ на | Copying a database (Ron Gafron <rgafron@sbcglobal.net>) |
Ответы |
Re: Copying a database
|
Список | pgadmin-support |
Le 13/08/2010 01:06, Ron Gafron a écrit : > Good day all, > > As a relative newbie to Postgres, I am looking for the "best way" to > make a copy of a database I am using. Is there a "standard way" to use > pgAdmin to do this? I've seen a number of posts using the command line > to do this, but so far, about all I've seen using pgAdmin are posts > about using the backup/restore routine to do this, but people seem to > have trouble with this at times. > > All I'm interested in copying is the database structure at this point, > and I think I can see in pgAdmin how to do this with the backup. So, > would the steps be..... > 1. Create the database backup. > 2. Create a new, empty database with a new name. > 3. Restore the backup to the new, empty database? > > Thanks for any guidance you can provide, and have a good day. > There is two possible ways to save and restore the structure only. If you want a custom dump, you'll have to dump all the database (structure and data). It's on the restore step that you need to tick the "Only schema" checkbox. If you want a plain (SQL) dump, you have to tick the "Only schema" checkbox before doing the dump. You don't have anything special to on the restore step. /me wondering why we don't propose to do a "schema only" and "data only" dump when using a custom or tar dump. -- Guillaumehttp://www.postgresql.frhttp://dalibo.com
В списке pgadmin-support по дате отправления: