How I can know a back up database is up to date

Started by Nonameover 18 years ago7 messagesgeneral
Jump to latest
#1Noname
son@raider.co.nz

Hello

My database is restored from a dump file every day. How I know that this
database is up to date (as it has no timestamp in any table).

If I create a file, I can know when I created it by seeing its property.
How I can do the same thing with a back up database.

Ta.

In reply to: Noname (#1)
Re: How I can know a back up database is up to date

On 09/08/2007 23:40, son@raider.co.nz wrote:

My database is restored from a dump file every day. How I know that this
database is up to date (as it has no timestamp in any table).

If I create a file, I can know when I created it by seeing its property.
How I can do the same thing with a back up database.

Do the backup from a shell script that names the output file with the
current date/time.

Ray.

---------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@iol.ie
---------------------------------------------------------------

In reply to: Noname (#1)
Timestamp in pg_dump output, was Re: How I can know a back up database is up to date

On 09/08/2007 23:40, son@raider.co.nz wrote:

My database is restored from a dump file every day. How I know that this
database is up to date (as it has no timestamp in any table).

If I create a file, I can know when I created it by seeing its property.
How I can do the same thing with a back up database.

Actually, it *would* be really handy if pg_dump included a timestamp in
the plain-text output. The version I use regularly (Windows)
doesn't...it simply says "PostgreSQL database dump" which is only
helpful to a point. :-)

Ray.

---------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@iol.ie
---------------------------------------------------------------

#4Richard Broersma Jr
rabroersma@yahoo.com
In reply to: Raymond O'Donnell (#3)
Re: Timestamp in pg_dump output, was Re: How I can know a back up database is up to date
--- Raymond O'Donnell <rod@iol.ie> wrote:

On 09/08/2007 23:40, son@raider.co.nz wrote:

My database is restored from a dump file every day. How I know that this
database is up to date (as it has no timestamp in any table).

If I create a file, I can know when I created it by seeing its property.
How I can do the same thing with a back up database.

Actually, it *would* be really handy if pg_dump included a timestamp in
the plain-text output. The version I use regularly (Windows)
doesn't...it simply says "PostgreSQL database dump" which is only
helpful to a point. :-)

If you need to, you can append your own timestamp to the dump file if you need it.

I rolled this functionality into a .bat file.

Regards,
Richard Broersma Jr.

In reply to: Richard Broersma Jr (#4)
Re: Timestamp in pg_dump output, was Re: How I can know a back up database is up to date

On 10/08/2007 18:40, Richard Broersma Jr wrote:

If you need to, you can append your own timestamp to the dump file if you need it.

Heh heh, I just gave this same advice in reply to the post that prompted
this idea. :-)

Thanks,

Ray.

---------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@iol.ie
---------------------------------------------------------------

#6Tom Lane
tgl@sss.pgh.pa.us
In reply to: Raymond O'Donnell (#3)
Re: Timestamp in pg_dump output, was Re: How I can know a back up database is up to date

"Raymond O'Donnell" <rod@iol.ie> writes:

Actually, it *would* be really handy if pg_dump included a timestamp in
the plain-text output.

Use the "verbose" option.

regards, tom lane

In reply to: Tom Lane (#6)
Re: Timestamp in pg_dump output, was Re: How I can know a back up database is up to date

On 10/08/2007 19:10, Tom Lane wrote:

Use the "verbose" option.

[/me tries it out....]

That'll do nicely - thanks.

Ray.

---------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@iol.ie
---------------------------------------------------------------