Re: [GENERAL] Backup up database

From: Simon Drabble <simon(at)fiddletrudge(dot)dyn(dot)ml(dot)org>
To: Brian <signal(at)shreve(dot)net>
Cc: pgsql-general(at)postgreSQL(dot)org
Subject: Re: [GENERAL] Backup up database
Date: 1998-09-17 19:33:54
Message-ID: Pine.LNX.3.95.980917153144.2577B-100000@fiddletrudge.dyn.ml.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 17 Sep 1998, Brian wrote:

> I am wanting to make a nightly dump/backup of our database in case
> something happens to it. I'll probably run the backup right before I
> vacuum each night.
>
> Is their a command I can type that will dump the entire database, complete
> with relations and data, so that if something did happen to it, It could
> be 100% restored?
>
> Brian

pg_dump dbname > database.dump

Then, to restore,

psql -f database.dump template

(you can use any db you have access to in place of "template")

Simon.

>
>
> --------------------------------------------------------------------------
> Brian Feeny (BF304) | ShreveNet Inc. - Premium Internet Service Provider
> Network Administrator | Shreveport, Louisiana - http://www.shreve.net/
> signal(at)shreve(dot)net | Web Hosting, Virtual Domains, Storefronts,
> (318)222-2NET x 109 | Database/Web Integration, 56k, ISDN, T1
>
>

--
...oooOOOooo...
Simon Drabble mailto:madlather(at)syspac(dot)com
http://fiddletrudge.dyn.ml.org/
KreatAPayj -- ~simon/KreatAPayj/login.html
LizardCam -- LizardCam/LizardCam.html
Linux Knowledge Base -- ~simon/LinuxKB/index.html

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Christophe Pettus 1998-09-17 19:48:08
Previous Message Brian 1998-09-17 19:24:29 Backup up database