Re: [SPAM] backup task target

From: Moreno Andreo <moreno(dot)andreo(at)evolu-s(dot)it>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: [SPAM] backup task target
Date: 2017-03-22 12:19:13
Message-ID: 985bfdfb-eaa3-03b0-de7f-f2569356355b@evolu-s.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Il 22/03/2017 11:39, Andrea Bonomelli
ha scritto:<br>
</div>
<blockquote
cite="mid:CAN9Nn1oG_8-shFz1dX0e2V72f=TswveVLw6NATQGFMhV0gxTVA(at)mail(dot)gmail(dot)com"
type="cite">
<div dir="ltr">
<div>Hi</div>
<div><br>
</div>
<div><br>
</div>
<div>How do I know if my full database is being backed up?</div>
<div>I have a script already in place that runs a nightly backup
of a database called okay_db that runs this command:</div>
<div>/usr/lib/postgresql/8.4/bin/pg_dump -h 10.11.7.5 --username
postgres okay_db --blobs --file '<span class="gmail-s1"> + db
+ </span>' --format=custom --verbose --no-password'<br>
</div>
</div>
</blockquote>
It seems you're running PostgreSQL 8.4, that's way past EOL. If I
were you, I'll consider upgrading.<br>
If you just need to know if the backup process has terminated
without errors, check pg_dump return value == 0. However, this does
not assure you that your backup is "good".<br>
There was a thread about a similar discussion some days ago, <br>
<a class="moz-txt-link-freetext" href="http://www.postgresql-archive.org/How-Can-I-check-PostgreSQL-backup-is-successfully-or-not-td5946486.html">http://www.postgresql-archive.org/How-Can-I-check-PostgreSQL-backup-is-successfully-or-not-td5946486.html</a><br>
<br>
In general, AFAIK, the only way where you can be 100% sure that your
backup is OK, so it can be used for recovery, is to pg_restore the
file you just obtained into a test database whose schema is
identical to the one you're backing up.<br>
<br>
<blockquote
cite="mid:CAN9Nn1oG_8-shFz1dX0e2V72f=TswveVLw6NATQGFMhV0gxTVA(at)mail(dot)gmail(dot)com"
type="cite">
<div dir="ltr"><br>
<div>In PGAdmin III, okay_db2 appears to be under the main
database called okay_db as well. How do I know which one is
getting backed up? The whole database or just one into the
server database?</div>
</div>
</blockquote>
So in pgAdminIII you can see all the 2 databases under
Server/Databases, right?<br>
As for the command you report in the OP, the one being dumped is
okay_db. To dump the whole cluster (so all databases) you should use
pg_dumpall, or issue a pg_dump for every database you need to
backup.<br>
<br>
HTH.<br>
Cheers,<br>
Moreno.<br>
<blockquote
cite="mid:CAN9Nn1oG_8-shFz1dX0e2V72f=TswveVLw6NATQGFMhV0gxTVA(at)mail(dot)gmail(dot)com"
type="cite">
<div dir="ltr">
<div><br>
</div>
<div>Sorry for the terminology not sure if I'm being clear as
this is not my field of expertise</div>
-- <br>
<div class="gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<p
style="margin:0px;font-size:14px;font-family:avenir"><br>
</p>
<p
style="margin:0px;font-size:14px;font-family:avenir"><span
style="letter-spacing:0px">Andrea Bonomelli</span><span
style="letter-spacing:0px"><br>
</span></p>
<p style="font-size:13px;margin:0px"><span
style="letter-spacing:0px"><font face="arial
black, sans-serif">OKAY STUDIO</font></span></p>
<p
style="margin:0px;font-size:12px;font-family:avenir;color:rgb(35,35,35);min-height:16px"><br>
</p>
<p
style="margin:0px;font-size:12px;font-family:avenir"><span
style="letter-spacing:0px">+44 207 127 0764</span></p>
<p
style="margin:0px;font-size:12px;font-family:avenir"><span
style="letter-spacing:0px"><br>
</span></p>
<p
style="margin:0px;font-size:12px;font-family:avenir"><a
moz-do-not-send="true"
href="http://okaystudio.co.uk/"
style="color:rgb(17,85,204)" target="_blank"><span
style="color:rgb(34,34,34)">okaystudio</span>.<span
style="color:rgb(34,34,34)">co</span>.<span
style="color:rgb(34,34,34)">uk</span></a> <span
style="color:rgb(153,153,153)">/</span> <a
moz-do-not-send="true"
href="http://twitter.com/okaystudioldn"
style="color:rgb(17,85,204)" target="_blank">twitter</a> <span
style="color:rgb(153,153,153)">/ </span><a
moz-do-not-send="true"
href="http://facebook.com/okaystudio"
style="color:rgb(17,85,204)" target="_blank">facebook</a><br>
</p>
<p
style="margin:0px;font-size:12px;font-family:avenir"><a
moz-do-not-send="true"
href="http://okaystudio.co.uk/"
style="color:rgb(17,85,204)" target="_blank"><br>
</a></p>
<p
style="margin:0px;font-size:12px;font-family:avenir"><span
style="font-family:tahoma,sans-serif"><i
style="color:rgb(153,153,153);font-size:x-small">This
transmission is confidential and may be
privileged.  </i><i
style="color:rgb(153,153,153);font-size:x-small">It
is for use by the addressee(s) only. If you
are not the addressee or if this email is
sent to you in error, please let us know by
return</i><span
style="color:rgb(153,153,153);font-size:x-small"> </span><i
style="color:rgb(153,153,153);font-size:x-small">to <a
moz-do-not-send="true"
href="mailto:info(at)okaystudio(dot)co(dot)uk"
style="color:rgb(17,85,204)"
target="_blank">info(at)okaystudio(dot)co(dot)uk</a> a<span
style="background-image:none;background-repeat:repeat">nd delete the
message from your system. </span></i><i
style="color:rgb(153,153,153);font-size:x-small"><span
style="background-image:none;background-repeat:repeat"> </span>No
contract may be concluded on behalf of Okay
Studio email. Okay Studio reserves the right
to monitor e-mail communication through its
network.<br>
</i></span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<p><br>
</p>
</body>
</html>

Attachment Content-Type Size
unknown_filename text/html 7.5 KB

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Neha Khatri 2017-03-23 04:57:58 Why psql connection assumes default database name as the username
Previous Message Moreno Andreo 2017-03-22 12:11:58 Re: How to configure Microsoft Access to connect to a PostgreSQL database?