From: Gunnar Lindholm <gunix@telia.com>
To: pgsql-admin@postgresql.org
Subject: Re: Crontab and PostgreSQL Backup
Date: Thu, 5 Oct 2000 21:53:41 +0200
Message-ID: <00100522053800.00314@dilbert> (raw)
In-Reply-To: <39DCCA3D.5D8FD5CF@lncc.br>
References: <39DCCA3D.5D8FD5CF@lncc.br>
>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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: gunix@telia.com
Subject: Re: Crontab and PostgreSQL Backup
In-Reply-To: <00100522053800.00314@dilbert>
References: <39DCCA3D.5D8FD5CF@lncc.br> <00100522053800.00314@dilbert>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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