pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedbackup/restore
9+ messages / 9 participants
[nested] [flat]
* backup/restore
@ 2000-09-08 23:13 Lindell Alderman <lindell@axispt.com>
2000-09-11 14:54 ` Re: backup/restore Ross J. Reedstrom <reedstrm@rice.edu>
0 siblings, 1 reply; 9+ messages in thread
From: Lindell Alderman @ 2000-09-08 23:13 UTC (permalink / raw)
To: pgsql-admin
I am trying to backup and restore a database, but when run the following:
dropdb test
createdb test
I find that the newly created database "test" is not empty but still has
all of the old relations and tables in it. How do I destroy a database
so that it is truly gone!?!?!? I need a totally clean databaes to restore
my data into.
-L
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: backup/restore
2000-09-08 23:13 backup/restore Lindell Alderman <lindell@axispt.com>
@ 2000-09-11 14:54 ` Ross J. Reedstrom <reedstrm@rice.edu>
2000-09-11 23:26 ` Re: backup/restore Tim Quinlan <trquinlan@home.com>
0 siblings, 1 reply; 9+ messages in thread
From: Ross J. Reedstrom @ 2000-09-11 14:54 UTC (permalink / raw)
To: Lindell Alderman <lindell@axispt.com>; +Cc: pgsql-admin
On Fri, Sep 08, 2000 at 04:13:20PM -0700, Lindell Alderman wrote:
> I am trying to backup and restore a database, but when run the following:
>
> dropdb test
> createdb test
>
> I find that the newly created database "test" is not empty but still has
> all of the old relations and tables in it. How do I destroy a database
> so that it is truly gone!?!?!? I need a totally clean databaes to restore
> my data into.
I'm going to put on my swami hat and read your mind now:
Ah, your using Linux, specifically the Debian distribution, are you not?
The problem is that psql by default connects to a database named the same
as the unix username, except on Debian, where it defaults to connecting
to the template1 database, since this is guaranteed to always exist. The
primary purpose of template1 is to serve as a (surprise) template to
build new databases on.
What does this mean? Well, if you put anything in template1 (like install
the pgpsql scipt language) it will, be default, be installed in all your
new dbs.
Unfortunately, if you accidently create tables in template1 (on Debian,
just forgetting to put the db name in a psql command line will do it),
they'll end up getting copied into every new db after that.
So, connect to template1, and delete everything you don't want from there.
Ross (learned from experience, I did)
--
Ross J. Reedstrom, Ph.D., <reedstrm@rice.edu>
NSBRI Research Scientist/Programmer
Computer and Information Technology Institute
Rice University, 6100 S. Main St., Houston, TX 77005
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: backup/restore
2000-09-08 23:13 backup/restore Lindell Alderman <lindell@axispt.com>
2000-09-11 14:54 ` Re: backup/restore Ross J. Reedstrom <reedstrm@rice.edu>
@ 2000-09-11 23:26 ` Tim Quinlan <trquinlan@home.com>
0 siblings, 0 replies; 9+ messages in thread
From: Tim Quinlan @ 2000-09-11 23:26 UTC (permalink / raw)
To: pgsql-admin
This happens on Slackware as well.
"Ross J. Reedstrom" wrote:
> On Fri, Sep 08, 2000 at 04:13:20PM -0700, Lindell Alderman wrote:
> > I am trying to backup and restore a database, but when run the following:
> >
> > dropdb test
> > createdb test
> >
> > I find that the newly created database "test" is not empty but still has
> > all of the old relations and tables in it. How do I destroy a database
> > so that it is truly gone!?!?!? I need a totally clean databaes to restore
> > my data into.
>
> I'm going to put on my swami hat and read your mind now:
>
> Ah, your using Linux, specifically the Debian distribution, are you not?
>
> The problem is that psql by default connects to a database named the same
> as the unix username, except on Debian, where it defaults to connecting
> to the template1 database, since this is guaranteed to always exist. The
> primary purpose of template1 is to serve as a (surprise) template to
> build new databases on.
>
> What does this mean? Well, if you put anything in template1 (like install
> the pgpsql scipt language) it will, be default, be installed in all your
> new dbs.
>
> Unfortunately, if you accidently create tables in template1 (on Debian,
> just forgetting to put the db name in a psql command line will do it),
> they'll end up getting copied into every new db after that.
>
> So, connect to template1, and delete everything you don't want from there.
>
> Ross (learned from experience, I did)
> --
> Ross J. Reedstrom, Ph.D., <reedstrm@rice.edu>
> NSBRI Research Scientist/Programmer
> Computer and Information Technology Institute
> Rice University, 6100 S. Main St., Houston, TX 77005
^ permalink raw reply [nested|flat] 9+ messages in thread
* backup restore
@ 2003-11-12 02:51 Colm De Barra <colm@aruke.com>
2003-11-12 03:07 ` Re: backup restore Andrew Rawnsley <ronz@ravensfield.com>
0 siblings, 1 reply; 9+ messages in thread
From: Colm De Barra @ 2003-11-12 02:51 UTC (permalink / raw)
To: pgsql-admin
Hi
I'm in charge of a linux DB server running postgres 7.3.2.
The OS disk recently died taking the postgres installation
with it but the data directory of postgres was on a seperate SCSI
disk and is still OK.
I've put in a new OS disk, installed linux on it again, mounted the data
disk, and installed postgres up as far as the "make install" stage.
Can anyone tell me where to go from here to get postgres to run with the
old DB ?? is all the DB structure information stored in the data directory ?
Any help would be appreciated
Colm
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If a kid asks where rain comes from, I think a cute
thing to tell him is, "God is crying." And if he asks
why God is crying, another cute thing to tell him is, "Probably
because of something you did."
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
My Website : http://www.angelfire.com/ia/japan/
BoomBox : http://www.b00mb0x.org
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: backup restore
2003-11-12 02:51 backup restore Colm De Barra <colm@aruke.com>
@ 2003-11-12 03:07 ` Andrew Rawnsley <ronz@ravensfield.com>
0 siblings, 0 replies; 9+ messages in thread
From: Andrew Rawnsley @ 2003-11-12 03:07 UTC (permalink / raw)
To: Colm De Barra <colm@aruke.com>; +Cc: pgsql-admin
You ought to be able to just start up Postgres pointing to the existing
data. So assuming the
data directory is /db, just doing 'postmaster -D /db' should work.
Provided, of course, you installed the exact version that was there
before, with the same user/uid
as before.
On Nov 11, 2003, at 9:51 PM, Colm De Barra wrote:
> Hi
> I'm in charge of a linux DB server running postgres 7.3.2.
> The OS disk recently died taking the postgres installation
> with it but the data directory of postgres was on a seperate SCSI
> disk and is still OK.
>
> I've put in a new OS disk, installed linux on it again, mounted the
> data
> disk, and installed postgres up as far as the "make install" stage.
> Can anyone tell me where to go from here to get postgres to run with
> the
> old DB ?? is all the DB structure information stored in the data
> directory ?
>
> Any help would be appreciated
> Colm
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> If a kid asks where rain comes from, I think a cute
> thing to tell him is, "God is crying." And if he asks
> why God is crying, another cute thing to tell him is, "Probably
> because of something you did."
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> My Website :http://www.angelfire.com/ia/japan/
> BoomBox :http://www.b00mb0x.org
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
--------------------
Andrew Rawnsley
President
The Ravensfield Digital Resource Group, Ltd.
(740) 587-0114
www.ravensfield.com
^ permalink raw reply [nested|flat] 9+ messages in thread
* Backup / Restore
@ 2004-06-23 11:40 Eduardo S. Fontanetti <dufuzzy@yahoo.com.br>
2004-06-23 13:27 ` Re: Backup / Restore V i s h a l Kashyap @ [Sai Hertz And Control Systems] <sank89@sancharnet.in>
0 siblings, 1 reply; 9+ messages in thread
From: Eduardo S. Fontanetti @ 2004-06-23 11:40 UTC (permalink / raw)
To: pgsql-admin
What is the most recommended way to backup a
PostgreSQL database?
And to restore it?
I would like to get ALL the data and properties
possible, because if I have a problem, and I lost my
current database, I can just restore it, and will be
all exactly like was before.
What is the best way? pg_dump? If yes, what options I
need to use?
Thanks a lot!!
Eduardo S. Fontanetti
______________________________________________________________________
Yahoo! Mail - agora com 100MB de espaço, anti-spam e antivírus grátis!
http://br.info.mail.yahoo.com/
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: Backup / Restore
2004-06-23 11:40 Backup / Restore Eduardo S. Fontanetti <dufuzzy@yahoo.com.br>
@ 2004-06-23 13:27 ` V i s h a l Kashyap @ [Sai Hertz And Control Systems] <sank89@sancharnet.in>
0 siblings, 0 replies; 9+ messages in thread
From: V i s h a l Kashyap @ [Sai Hertz And Control Systems] @ 2004-06-23 13:27 UTC (permalink / raw)
To: Eduardo S. Fontanetti <dufuzzy@yahoo.com.br>; +Cc: pgsql-admin
Dear Eduardo ,
>What is the most recommended way to backup a
>PostgreSQL database?
>
>
>
pg_dump --disable-triggers -U <user_name> -a -d -b -D -Fc -Z 9 -f
<filername.tar.gz> <dbname>
+
A file system backup could be done but for this you will have to
shutdown PostgreSQL server
before filesystem backup is done
>And to restore it?
>
>
pg_restore --disable-triggers -U <user_name> -d <dbname>
<backupfilename.tar.gz>
IN case of Filesystem backup just stop PostgreSQL and replace the Dumped
or Tared file of the
filesystem
Links
http://www.commandprompt.com/ppbook/index.lxp?lxpwrap=x17860%2ehtm
And ofcource the PostgreSQL documentation itself
--
Best Regards,
Vishal Kashyap
Director / Lead Software Developer,
Sai Hertz And Control Systems Pvt Ltd,
http://saihertz.rediffblogs.com [Soon http://www.saihertz.com]
Yahoo IM: coeb_college[ a t ]yahoo.com
^ permalink raw reply [nested|flat] 9+ messages in thread
* Backup/Restore
@ 2021-07-23 16:35 Ron Watkins <rwatki@gmail.com>
2021-07-23 17:06 ` Re: Backup/Restore Ron <ronljohnsonjr@gmail.com>
0 siblings, 1 reply; 9+ messages in thread
From: Ron Watkins @ 2021-07-23 16:35 UTC (permalink / raw)
To: pgsql-admin
Is it possible to backup a Azure postgres database and restore it on GCP?
If so, is there some documentation how to do that?
--
Ron Watkins, K7DOG
602.743.5272
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: Backup/Restore
2021-07-23 16:35 Backup/Restore Ron Watkins <rwatki@gmail.com>
@ 2021-07-23 17:06 ` Ron <ronljohnsonjr@gmail.com>
0 siblings, 0 replies; 9+ messages in thread
From: Ron @ 2021-07-23 17:06 UTC (permalink / raw)
To: pgsql-admin@lists.postgresql.org
On 7/23/21 11:35 AM, Ron Watkins wrote:
> Is it possible to backup a Azure postgres database and restore it on GCP?
> If so, is there some documentation how to do that?
You asked the same question two days ago, and received an answer.
--
Angular momentum makes the world go 'round.
^ permalink raw reply [nested|flat] 9+ messages in thread
end of thread, other threads:[~2021-07-23 17:06 UTC | newest]
Thread overview: 9+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-09-08 23:13 backup/restore Lindell Alderman <lindell@axispt.com>
2000-09-11 14:54 ` Ross J. Reedstrom <reedstrm@rice.edu>
2000-09-11 23:26 ` Tim Quinlan <trquinlan@home.com>
2003-11-12 02:51 backup restore Colm De Barra <colm@aruke.com>
2003-11-12 03:07 ` Re: backup restore Andrew Rawnsley <ronz@ravensfield.com>
2004-06-23 11:40 Backup / Restore Eduardo S. Fontanetti <dufuzzy@yahoo.com.br>
2004-06-23 13:27 ` Re: Backup / Restore V i s h a l Kashyap @ [Sai Hertz And Control Systems] <sank89@sancharnet.in>
2021-07-23 16:35 Backup/Restore Ron Watkins <rwatki@gmail.com>
2021-07-23 17:06 ` Re: Backup/Restore Ron <ronljohnsonjr@gmail.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