473,699 Members | 3,143 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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*******@postg resql.org

Nov 11 '05 #1
4 22977
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.u k> 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
2974
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 haven't permission to do this in Linux, instead I have admin permision in MySQL.
3
2244
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 the portion that is changed? Also if the db is expected to change very often, and wouldn't it make
2
881
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, easy-to-use web site design software
2
2221
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 database under it. So we would see three folders on D drive: DB2 folder, TEST folder and EDU folder, each database has 5 tablespaces and they exist on F drive. So I told the client to replicate the three instance folders on D and the data folder...
6
2664
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
1178
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 then get the file path string by using control.value, and write it to the database. I don't want to actually do anything with the file. What I can't do is programmatically set the value of the FileField control - all the reading I have done says that...
0
2391
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 then get the file path string by using control.value, and write it to the database. I don't want to actually do anything with the file. What I can't do is programmatically set the value of the FileField control - all the reading I have done says that...
4
1567
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 that should replicate “on the fly” or as asynchronous sync. The problem is that both locations work in the database frequently. So
0
4278
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 begin it from the beginning. what are the steps to be followed out to replicate postgres database using pgpool-II. its quite urgent. Thanks, ntech
2
1933
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 development website pulls from that copied database, instead of the one we use to make a living. I tried importing the old database into a new one using the 'DTS Import/Export' wizard, but unfortunately, it did not copy the thing exactly. Using...
0
9199
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8947
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8902
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7787
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6552
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4392
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4642
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2366
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2016
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.