pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Crontab and PostgreSQL Backup
2+ messages / 2 participants
[nested] [flat]

* Crontab and PostgreSQL Backup
@ 2000-10-05 18:36  Fabio Alberto Sobral <sobral@lncc.br>
  0 siblings, 1 reply; 2+ messages in thread

From: Fabio Alberto Sobral @ 2000-10-05 18:36 UTC (permalink / raw)
  To: pgsql-admin

Dear Sirs,

    I use PostgreSQL version 7.0.2 for Linux Conectiva 5.1 Server, and I
would
like to know how do I do to configure and start the PostgreSQL's backup
and restore
using crontab?
    Any Tips?

Regards,

Fabio Sobral.




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Crontab and PostgreSQL Backup
@ 2000-10-05 19:53  Gunnar Lindholm <gunix@telia.com>
  parent: Fabio Alberto Sobral <sobral@lncc.br>
  0 siblings, 0 replies; 2+ messages in thread

From: Gunnar Lindholm @ 2000-10-05 19:53 UTC (permalink / raw)
  To: pgsql-admin

>I use PostgreSQL version 7.0.2 for Linux Conectiva 5.1 Server, and I
> would like to know how do I do to configure and start the PostgreSQL's backup
> and restore 
>using crontab?

restore with crontab???

Anyway.
Put a line in crontab like:
3  5 * * * /script/backdb.sh

and the script  /script/backdb.sh
could then look like:

#!/bin/bash
DATE=`date +%Y%m%d`
/usr/pgsql/bin/pg_dump databas > /tmp/dump.$DATE

then you have a file in /tmp/dump.$DATE that you could put on tape or whatever
you use. Use pg_dumpall if you want all databases.
You might want to consider making a  backup of the files  (for example
pg_hba.conf) in  PGDATA directory. Read the man page for details about OID's.

Good luck.
Gunnar.



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2000-10-05 19:53 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-10-05 18:36 Crontab and PostgreSQL Backup Fabio Alberto Sobral <sobral@lncc.br>
2000-10-05 19:53 ` Gunnar Lindholm <gunix@telia.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox