Thread: Backup

Backup

From
ljsharpe
Date:
Hi All,

Operating databases is not my forte and I am new to it.  For me a
database is a tool to use to help with my main work (so is a computer if
it comes to that).  I can ill afford to lose any data.

I run two databases for personal purposes and have a two machine
network.  The "old" machine I use for back up purposes.  I have run the
dump command and produced two .sql files which I have transferred to my
old machine via ftp.  Both have successfully re-created their databases
on my old machine.

I have now added to both databases and wish to do a subsequent back
ups.

Do I just run the dump command on each database again please?  Will this
overwrite the original .sql files or should I delete (rm) the original
.sql files on my current or working machine and start again?  On the old
machine do I delete the first .sql files and ftp the newer ones and then
just run the psql command to re-create the updated databases?  Do I have
to drop the first re-created databases before attempting to restore the
updated .sql files after sending them via ftp from my current machine to
my old machine?  I could just try to see what works (as I did when
starting and running postgresql in the first place) but I worry about
losing my data in an ill-conceived experiment.

I am running Red Hat Linux 6.2.

Thanks for any help.

Cheers,



Les.
--
Les Sharpe
Tel (08) 9193 1335
Fax (manual) (08) 9193 1335
ljsharpe@westnet.com.au
http://www.westnet.com.au/ljsharpe

100 things you don't want the sysadmin to say.
 76. I have never seen it do *that* before...

Re: Backup

From
Jason Friedman
Date:
When you produced the two .sql backup files, what command did you use to
produce them?

In general, if you want to create a database with the same name as the old
one, you'll have to drop the old one first.  If you've got lots of disk
space you could load the new backup as db2, verify it, then drop db1.  On
the next backup cycle you can load db1, verify it, then drop db2, etc.

Jason

On Sun, 31 Mar 2002, ljsharpe wrote:

> Hi All,
>
> Operating databases is not my forte and I am new to it.  For me a
> database is a tool to use to help with my main work (so is a computer if
> it comes to that).  I can ill afford to lose any data.
>
> I run two databases for personal purposes and have a two machine
> network.  The "old" machine I use for back up purposes.  I have run the
> dump command and produced two .sql files which I have transferred to my
> old machine via ftp.  Both have successfully re-created their databases
> on my old machine.
>
> I have now added to both databases and wish to do a subsequent back
> ups.
>
> Do I just run the dump command on each database again please?  Will this
> overwrite the original .sql files or should I delete (rm) the original
> .sql files on my current or working machine and start again?  On the old
> machine do I delete the first .sql files and ftp the newer ones and then
> just run the psql command to re-create the updated databases?  Do I have
> to drop the first re-created databases before attempting to restore the
> updated .sql files after sending them via ftp from my current machine to
> my old machine?  I could just try to see what works (as I did when
> starting and running postgresql in the first place) but I worry about
> losing my data in an ill-conceived experiment.
>
> I am running Red Hat Linux 6.2.
>
> Thanks for any help.
>
> Cheers,
>
>
>
> Les.
>