472,371 Members | 1,454 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,371 software developers and data experts.

how to replicate database

Is there a way to replicate one-off(a copy of
duplicate) of an existing Postgres database.

regards,
caroline
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

Nov 11 '05 #1
4 22853
On Thu, 2003-09-11 at 09:15, Caroline Yong wrote:
Is there a way to replicate one-off(a copy of
duplicate) of an existing Postgres database.


pg_dump mydatabase > some_file

move some_file to another machine (or to duplicate the database on the
same server, use a new database name below)

createdb mydatabase
psql -d mydatabase < some_file

--
Oliver Elphick Ol************@lfix.co.uk
Isle of Wight, UK http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
========================================
"I am crucified with Christ; nevertheless I live; yet
not I, but Christ liveth in me; and the life which I
now live in the flesh I live by the faith of the Son
of God, who loved me, and gave himself for me."
Galatians 2:20
---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Nov 11 '05 #2
i am having problem of running pg_dump. i am using
winXP home here. postgreSQL requested me to re-install
the application again as can't found cygz.dll file.

do u have any idea?

--- Oliver Elphick <ol**@lfix.co.uk> wrote:
On Thu, 2003-09-11 at 09:15, Caroline Yong wrote:
Is there a way to replicate one-off(a copy of
duplicate) of an existing Postgres database.


pg_dump mydatabase > some_file

move some_file to another machine (or to duplicate
the database on the
same server, use a new database name below)

createdb mydatabase
psql -d mydatabase < some_file

--
Oliver Elphick
Ol************@lfix.co.uk
Isle of Wight, UK
http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A
614D 4C34 3E1D 0C1C

========================================
"I am crucified with Christ; nevertheless I
live; yet
not I, but Christ liveth in me; and the life
which I
now live in the flesh I live by the faith of
the Son
of God, who loved me, and gave himself for
me."
Galatians
2:20

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Nov 11 '05 #3

On Thu, 11 Sep 2003, Caroline Yong wrote:
Is there a way to replicate one-off(a copy of
duplicate) of an existing Postgres database.

regards,
caroline


There's obviously the pg_dump utility (or pg_dumpall which also gets all the
global info like db users). You could also try:

createdb -T old-db new-db

as an interesting exercise, if you just want another copy in the same
cluster. I've not done that myself but I don't see why it wouldn't work,
someone else might know differently.

--
Nigel Andrews

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 11 '05 #4

On Thu, 11 Sep 2003, Caroline Yong wrote:
Is there a way to replicate one-off(a copy of
duplicate) of an existing Postgres database.

regards,
caroline


There's obviously the pg_dump utility (or pg_dumpall which also gets all the
global info like db users). You could also try:

createdb -T old-db new-db

as an interesting exercise, if you just want another copy in the same
cluster. I've not done that myself but I don't see why it wouldn't work,
someone else might know differently.

--
Nigel Andrews

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 11 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: | last post by:
both of 2 servers are MySQL. how can I replicate a database to one server from another? until now I zip the database folder and I extract the zip file in other MySQL server. But now I...
3
by: jaekim | last post by:
Hi. I am wondering if it is a good idea to replicate sql server db files using frs. I don't really know how the frs works, so does frs replicates the whole database from time to time or just...
2
by: Caroline Yong | last post by:
Is there a way to replicate one-off(a copy of duplicate) of an existing Postgres database. regards, caroline __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free,...
2
by: db2group88 | last post by:
we are using db2 udb v8.2 Express edition on windows 2003,we use third party vendor software to help replicate one server to another. Production server has three instances, each instances has one...
6
by: Stanley Sinclair | last post by:
Can I "replicate" from a flat file which changes, but is not a part of a formal database?
0
by: Paul Hobbs | last post by:
Hi All, I am trying to replicate the functionality of the HTML FileField control. I can use it just fine to prompt a user to browse to a file, and it retrieves the full path just fine. I can...
0
by: Paul Hobbs | last post by:
Hi All, I am trying to replicate the functionality of the HTML FileField control. I can use it just fine to prompt a user to browse to a file, and it retrieves the full path just fine. I can...
4
by: Peter | last post by:
Hello I have 2 locations, that each has an MSSQL 2000 server. Since the locations are to far from each other and the connection is very slow. My thought was to have a database on both servers...
0
by: ntech | last post by:
Hello, i have successfully installed Pgpool-II in linux but i need to know how to replicate databases using it. i dont understand the steps provided in different sites. so, can anyone help me to...
2
by: idioteque | last post by:
Hi everyone, I don't have a lot of experience in database management, but I'm trying to replicate a database that is currently being used on a live website. I'd like to replicate it so that our...
2
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and credentials and received a successful connection...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
1
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a...
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
2
by: Ricardo de Mila | last post by:
Dear people, good afternoon... I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control. Than I need to discover what...
1
by: Johno34 | last post by:
I have this click event on my form. It speaks to a Datasheet Subform Private Sub Command260_Click() Dim r As DAO.Recordset Set r = Form_frmABCD.Form.RecordsetClone r.MoveFirst Do If...
1
by: ezappsrUS | last post by:
Hi, I wonder if someone knows where I am going wrong below. I have a continuous form and two labels where only one would be visible depending on the checkbox being checked or not. Below is the...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.