pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Dump and Restore
8+ messages / 7 participants
[nested] [flat]

* Dump and Restore
@ 2004-08-24 13:40 Eduardo S. Fontanetti <dufuzzy@yahoo.com.br>
  2004-08-24 13:57 ` Re: Dump and Restore Secrétariat <ets@rolland-fr.com>
  2004-08-24 15:29 ` Re: [GENERAL] Dump and Restore Paul Thomas <paul@tmsl.demon.co.uk>
  2004-08-24 16:28 ` Re: Dump and Restore Ron St-Pierre <rstpierre@syscor.com>
  0 siblings, 3 replies; 8+ messages in thread

From: Eduardo S. Fontanetti @ 2004-08-24 13:40 UTC (permalink / raw)
  To: pgsql-admin; pgsql-general@postgresql.org

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/



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: Dump and Restore
  2004-08-24 13:40 Dump and Restore Eduardo S. Fontanetti <dufuzzy@yahoo.com.br>
@ 2004-08-24 13:57 ` Secrétariat <ets@rolland-fr.com>
  2 siblings, 0 replies; 8+ messages in thread

From: Secrétariat @ 2004-08-24 13:57 UTC (permalink / raw)
  To: pgsql-general@postgresql.org

One way is to create another instance of your PG server,
using a different PGDATA path.
So your actual data won't be overwriten.

Luc

> 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 6: Have you searched our list archives?
>
>                http://archives.postgresql.org
>




^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: [GENERAL] Dump and Restore
  2004-08-24 13:40 Dump and Restore Eduardo S. Fontanetti <dufuzzy@yahoo.com.br>
@ 2004-08-24 15:29 ` Paul Thomas <paul@tmsl.demon.co.uk>
  2004-08-24 15:38   ` Re: [GENERAL] Dump and Restore Thilina Gunasekara <tgunasekara@openworld.org>
  2004-08-24 16:36   ` Re: [GENERAL] Dump and Restore Eduardo S. Fontanetti <dufuzzy@yahoo.com.br>
  2 siblings, 2 replies; 8+ messages in thread

From: Paul Thomas @ 2004-08-24 15:29 UTC (permalink / raw)
  To: Eduardo S . Fontanetti <dufuzzy@yahoo.com.br>; +Cc: pgsql-admin; pgsql-general@postgresql.org


On 24/08/2004 14:40 Eduardo S. Fontanetti wrote:
> 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   |
+------------------------------+---------------------------------------------+



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: [GENERAL] Dump and Restore
  2004-08-24 13:40 Dump and Restore Eduardo S. Fontanetti <dufuzzy@yahoo.com.br>
  2004-08-24 15:29 ` Re: [GENERAL] Dump and Restore Paul Thomas <paul@tmsl.demon.co.uk>
@ 2004-08-24 15:38   ` Thilina Gunasekara <tgunasekara@openworld.org>
  1 sibling, 0 replies; 8+ messages in thread

From: Thilina Gunasekara @ 2004-08-24 15:38 UTC (permalink / raw)
  To: Eduardo S . Fontanetti <dufuzzy@yahoo.com.br>; +Cc: pgsql-admin; pgsql-general@postgresql.org

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-owner@postgresql.org
[mailto:pgsql-admin-owner@postgresql.org]On Behalf Of Paul Thomas
Sent: 24 August 2004 16:30
To: Eduardo S . Fontanetti
Cc: pgsql-admin@postgresql.org; pgsql-general@postgresql.org
Subject: Re: [ADMIN] [GENERAL] Dump and Restore



On 24/08/2004 14:40 Eduardo S. Fontanetti wrote:
> 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




^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: [GENERAL] Dump and Restore
  2004-08-24 13:40 Dump and Restore Eduardo S. Fontanetti <dufuzzy@yahoo.com.br>
  2004-08-24 15:29 ` Re: [GENERAL] Dump and Restore Paul Thomas <paul@tmsl.demon.co.uk>
@ 2004-08-24 16:36   ` Eduardo S. Fontanetti <dufuzzy@yahoo.com.br>
  2004-08-24 17:12     ` Re: [GENERAL] Dump and Restore Oliver Elphick <olly@lfix.co.uk>
  1 sibling, 1 reply; 8+ messages in thread

From: Eduardo S. Fontanetti @ 2004-08-24 16:36 UTC (permalink / raw)
  To: Paul Thomas <paul@tmsl.demon.co.uk>; +Cc: pgsql-admin; pgsql-general@postgresql.org

I am using pg_dump.

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

Eduardo S. Fontanetti

 --- Paul Thomas <paul@tmsl.demon.co.uk> escreveu: 
> 
> On 24/08/2004 14:40 Eduardo S. Fontanetti wrote:
> > 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   |
>
+------------------------------+---------------------------------------------+
>  


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



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: [GENERAL] Dump and Restore
  2004-08-24 13:40 Dump and Restore Eduardo S. Fontanetti <dufuzzy@yahoo.com.br>
  2004-08-24 15:29 ` Re: [GENERAL] Dump and Restore Paul Thomas <paul@tmsl.demon.co.uk>
  2004-08-24 16:36   ` Re: [GENERAL] Dump and Restore Eduardo S. Fontanetti <dufuzzy@yahoo.com.br>
@ 2004-08-24 17:12     ` Oliver Elphick <olly@lfix.co.uk>
  2004-08-25 01:51       ` Re: [GENERAL] Dump and Restore Lawrence C <research_2004@yahoo.com>
  0 siblings, 1 reply; 8+ messages in thread

From: Oliver Elphick @ 2004-08-24 17:12 UTC (permalink / raw)
  To: Eduardo S. Fontanetti <dufuzzy@yahoo.com.br>; +Cc: Paul Thomas <paul@tmsl.demon.co.uk>; pgsql-admin; pgsql-general@postgresql.org

On Tue, 2004-08-24 at 17:36, Eduardo S. Fontanetti wrote:
> 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                                          olly@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




^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: [GENERAL] Dump and Restore
  2004-08-24 13:40 Dump and Restore Eduardo S. Fontanetti <dufuzzy@yahoo.com.br>
  2004-08-24 15:29 ` Re: [GENERAL] Dump and Restore Paul Thomas <paul@tmsl.demon.co.uk>
  2004-08-24 16:36   ` Re: [GENERAL] Dump and Restore Eduardo S. Fontanetti <dufuzzy@yahoo.com.br>
  2004-08-24 17:12     ` Re: [GENERAL] Dump and Restore Oliver Elphick <olly@lfix.co.uk>
@ 2004-08-25 01:51       ` Lawrence C <research_2004@yahoo.com>
  0 siblings, 0 replies; 8+ messages in thread

From: Lawrence C @ 2004-08-25 01:51 UTC (permalink / raw)
  To: olly@lfix.co.uk, "Eduardo S. Fontanetti" <dufuzzy@yahoo.com.br>; +Cc: Paul Thomas <paul@tmsl.demon.co.uk>; pgsql-admin; pgsql-general@postgresql.org

You can also
$ cat dumpfile | more


 --- Oliver Elphick <olly@lfix.co.uk> wrote: 
> On Tue, 2004-08-24 at 17:36, Eduardo S. Fontanetti
> wrote:
> > 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                                      
>    olly@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
>  

________________________________________________________________________
Yahoo! Messenger - Communicate instantly..."Ping" 
your friends today! Download Messenger Now 
http://uk.messenger.yahoo.com/download/index.html



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: Dump and Restore
  2004-08-24 13:40 Dump and Restore Eduardo S. Fontanetti <dufuzzy@yahoo.com.br>
@ 2004-08-24 16:28 ` Ron St-Pierre <rstpierre@syscor.com>
  2 siblings, 0 replies; 8+ messages in thread

From: Ron St-Pierre @ 2004-08-24 16:28 UTC (permalink / raw)
  To: Eduardo S. Fontanetti <dufuzzy@yahoo.com.br>; pgsql-general <pgsql-general@postgresql.org>

Eduardo S. Fontanetti wrote:

>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?
>  
>
<snip>
OK here's a recipe:
If you're using  pg_dump as in:
    pg_dump dbName > fileName
create your new database:
   createdb myNewDB (don't forget your encoding)
and then restore from the dump:
   psql -d myNewDB -f fileName

Ron




^ permalink  raw  reply  [nested|flat] 8+ messages in thread


end of thread, other threads:[~2004-08-25 01:51 UTC | newest]

Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-08-24 13:40 Dump and Restore Eduardo S. Fontanetti <dufuzzy@yahoo.com.br>
2004-08-24 13:57 ` Secrétariat <ets@rolland-fr.com>
2004-08-24 15:29 ` Paul Thomas <paul@tmsl.demon.co.uk>
2004-08-24 15:38   ` Thilina Gunasekara <tgunasekara@openworld.org>
2004-08-24 16:36   ` Eduardo S. Fontanetti <dufuzzy@yahoo.com.br>
2004-08-24 17:12     ` Oliver Elphick <olly@lfix.co.uk>
2004-08-25 01:51       ` Lawrence C <research_2004@yahoo.com>
2004-08-24 16:28 ` Ron St-Pierre <rstpierre@syscor.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox