Discussion:
Dump and Restore
(too old to reply)
Eduardo S. Fontanetti
2004-08-24 13:40:32 UTC
Permalink
How can I do a test if my dumping is really working, I
can't apply the dump in my database, because it will
overwrite a lot of data. I was thinking about restore
in another database name, but I can't, it always
restore on the original database.

Somebody have a cooking recipe about to test if my
backup is working fine, and will help if I need
sometime?

Thanks for all of you!

Eduardo S. Fontanetti





_______________________________________________________
Yahoo! Acesso Grátis - navegue de graça com conexão de qualidade!
http://br.acesso.yahoo.com/

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ***@postgresql.org
Paul Thomas
2004-08-24 15:29:56 UTC
Permalink
Post by Eduardo S. Fontanetti
How can I do a test if my dumping is really working, I
can't apply the dump in my database, because it will
overwrite a lot of data. I was thinking about restore
in another database name, but I can't, it always
restore on the original database.
Somebody have a cooking recipe about to test if my
backup is working fine, and will help if I need
sometime?
Are you using pg_dump or pg_dumpall? I just use pg_dump on individual
databases (pg_dumpall works on the whole cluster) and can restore that to
any database.


HTH
--
Paul Thomas
+------------------------------+---------------------------------------------+
| Thomas Micro Systems Limited | Software Solutions for
Business |
| Computer Consultants |
http://www.thomas-micro-systems-ltd.co.uk |
+------------------------------+---------------------------------------------+

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

http://www.postgresql.org/docs/faqs/FAQ.html
Thilina Gunasekara
2004-08-24 15:38:19 UTC
Permalink
Assuming you're using Unix Box
1. Dump your database DB_X
pg_dump -v -U postgresUsername DB_X | gzip -f - > DB_X.gz

2.Create database DB_Y
psql -U postgresUsername template1
CREATE DATABASE DB_Y
\q

3. zcat DB_X.gz | psql -U postgresUsername -f - DB_Y

Thilina


-----Original Message-----
From: pgsql-admin-***@postgresql.org
[mailto:pgsql-admin-***@postgresql.org]On Behalf Of Paul Thomas
Sent: 24 August 2004 16:30
To: Eduardo S . Fontanetti
Cc: pgsql-***@postgresql.org; pgsql-***@postgresql.org
Subject: Re: [ADMIN] [GENERAL] Dump and Restore
Post by Eduardo S. Fontanetti
How can I do a test if my dumping is really working, I
can't apply the dump in my database, because it will
overwrite a lot of data. I was thinking about restore
in another database name, but I can't, it always
restore on the original database.
Somebody have a cooking recipe about to test if my
backup is working fine, and will help if I need
sometime?
Are you using pg_dump or pg_dumpall? I just use pg_dump on individual
databases (pg_dumpall works on the whole cluster) and can restore that to
any database.


HTH

--
Paul Thomas
+------------------------------+--------------------------------------------
-+
| Thomas Micro Systems Limited | Software Solutions for
Business |
| Computer Consultants |
http://www.thomas-micro-systems-ltd.co.uk |
+------------------------------+--------------------------------------------
-+

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

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


---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org
Eduardo S. Fontanetti
2004-08-24 16:36:18 UTC
Permalink
I am using pg_dump.

It means that I can't restore to a different name
database??

Eduardo S. Fontanetti
Post by Eduardo S. Fontanetti
Post by Eduardo S. Fontanetti
How can I do a test if my dumping is really
working, I
Post by Eduardo S. Fontanetti
can't apply the dump in my database, because it
will
Post by Eduardo S. Fontanetti
overwrite a lot of data. I was thinking about
restore
Post by Eduardo S. Fontanetti
in another database name, but I can't, it always
restore on the original database.
Somebody have a cooking recipe about to test if my
backup is working fine, and will help if I need
sometime?
Are you using pg_dump or pg_dumpall? I just use
pg_dump on individual
databases (pg_dumpall works on the whole cluster)
and can restore that to
any database.
HTH
--
Paul Thomas
+------------------------------+---------------------------------------------+
Post by Eduardo S. Fontanetti
| Thomas Micro Systems Limited | Software Solutions
for
Business |
| Computer Consultants |
http://www.thomas-micro-systems-ltd.co.uk |
+------------------------------+---------------------------------------------+
_______________________________________________________
Yahoo! Acesso Grátis - navegue de graça com conexão de qualidade!
http://br.acesso.yahoo.com/

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster
Oliver Elphick
2004-08-24 17:12:12 UTC
Permalink
Post by Eduardo S. Fontanetti
I am using pg_dump.
It means that I can't restore to a different name
database??
If you use pg_dump[all] without other options it will dump to a text
file. Just edit the database name.
--
Oliver Elphick ***@lfix.co.uk
Isle of Wight http://www.lfix.co.uk/oliver
GPG: 1024D/A54310EA 92C8 39E7 280E 3631 3F0E 1EC0 5664 7A2F A543 10EA
========================================
"I saw in the night visions, and, behold, one like the
Son of man came with the clouds of heaven, and came to
the Ancient of days, and they brought him near before
him. And there was given him dominion, and glory, and
a kingdom, that all people, nations, and languages,
should serve him; his dominion is an everlasting
dominion, which shall not pass away, and his kingdom
that which shall not be destroyed."
Daniel 7:13,14


---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster
Lawrence C
2004-08-25 01:51:44 UTC
Permalink
You can also
$ cat dumpfile | more
On Tue, 2004-08-24 at 17:36, Eduardo S. Fontanetti
Post by Eduardo S. Fontanetti
I am using pg_dump.
It means that I can't restore to a different name
database??
If you use pg_dump[all] without other options it
will dump to a text
file. Just edit the database name.
--
Oliver Elphick
Isle of Wight
http://www.lfix.co.uk/oliver
GPG: 1024D/A54310EA 92C8 39E7 280E 3631 3F0E 1EC0
5664 7A2F A543 10EA
========================================
"I saw in the night visions, and, behold, one
like the
Son of man came with the clouds of heaven, and
came to
the Ancient of days, and they brought him near
before
him. And there was given him dominion, and
glory, and
a kingdom, that all people, nations, and
languages,
should serve him; his dominion is an
everlasting
dominion, which shall not pass away, and his
kingdom
that which shall not be destroyed."
Daniel 7:13,14
---------------------------(end of
broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster
________________________________________________________________________
Yahoo! Messenger - Communicate instantly..."Ping"
your friends today! Download Messenger Now
http://uk.messenger.yahoo.com/download/index.html

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

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

Loading...