Re: Automating backup

From: Richard Sydney-Smith <richard(at)ibisau(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Automating backup
Date: 2006-02-05 08:27:57
Message-ID: 43E5B70D.7000107@ibisau.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Doug. <br>
<br>
Many users are haphazard in their approach until
the machine fails and then they expect to be pulled from the poo.<br>
<br>
Done it too many times. I now will get the application to enforce an
additional integrity check. It must be backed up or else! Seems futile
to put all the effort into a database design that checks and ensures
everything except that a backup copy exists!<br>
<br>
Essentially I need access to a database record that gives the
timestamp for the last backup.<br>
Of course pgdump/vacuum could maintain such timestamps themselves. Is
that possible? If not then a proc in the database that calls
pgdump/vacuum and records the event is needed to give me peace of mind.<br>
<br>
regards<br>
<br>
Richard<br>
<br>
Doug McNaught wrote:
<blockquote cite="mid874q3g20bh(dot)fsf(at)asmodeus(dot)mcnaught(dot)org" type="cite">
<pre wrap="">Richard Sydney-Smith <a class="moz-txt-link-rfc2396E" href="mailto:richard(at)ibisau(dot)com">&lt;richard(at)ibisau(dot)com&gt;</a> writes:

</pre>
<blockquote type="cite">
<pre wrap=""> pch := pchar('pg_dump -C -h '+host+' -U '+usr+' -p '+pswd+ ' -f
'+bckup_path+' '+dbase);

to postgres.

as the operator is obviously logged in how do I
(1) trap their user id
(2) Send the call to pg_dump without knowing their password?

I expect this is a well worn route and am hoping not to have to
reinvent a wheel.
</pre>
</blockquote>
<pre wrap=""><!---->
I don't think it's "well-worn" at all--everyone I've ever heard of
runs pg_dump from a cron script.

Why not have a shell script run by the operator that runs pg_dump and
then calls psql to insert the log record (assuming the dump succeeds)?
Putting the logic inside of the database doesn't seem to buy you
anything AFAICS.

-Doug

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

<a class="moz-txt-link-freetext" href="http://archives.postgresql.org">http://archives.postgresql.org</a>

</pre>
</blockquote>
</body>
</html>

Attachment Content-Type Size
unknown_filename text/html 2.2 KB

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Brendan Duddridge 2006-02-05 08:38:40 Re: Postgres 8.1 for Mac
Previous Message Niederland 2006-02-05 03:47:31 update with subquery - unexpected results