Re: Backup automation

From: "Josh Berkus" <josh(at)agliodbs(dot)com>
To: aarni(dot)ruuhimaki(at)kymi(dot)com, pgsql-novice(at)postgresql(dot)org
Subject: Re: Backup automation
Date: 2001-12-10 20:48:42
Message-ID: web-524818@davinci.ethosmedia.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Aarni,

> There is a way to make the machine do this for me
> daily/weekly/whatever at a
> given time ? With a script, scheduled job or something, preferably to
> a text
> file ?

Yes, there is, and it's surprisingly easy and flexible. You'll need two
things:

1. Write a SHELL SCRIPT to make a remote connection to or from the
database server and back up all databases.

2. Use the command-line program CRON to schedule this backup for
appropriate times.

You may find that you simplfy your life also if you use PG_DUMPALL
instead of backing up each database individually, but this depends on
whether you will want to restore them individually or all at once.

Unfortunately, shell scripts and cron are more than I want to get into
in an e-mail. I learned this all myself by reading two books from
O'Reilly: Running Linux (for how to use Cron) and Learning the Bash
Shell (for how to write the script).

Perhaps someone will be kind enough to post their scripts on TechDocs (
( http://techdocs.postgresql.org/ ). Unfortunately, I don't have time
to clean mine up ...

> Running RH 7.1 / 2.4.9-kernel (up2date agent is great !) with PG
> 7.03.

You will want to upgrade as soon as convenient. In addition to the
added SQL commands, 7.1.x and 7.2 beta include improved backup and
restoration programs.

-Josh Berkus

______AGLIO DATABASE SOLUTIONS___________________________
Josh Berkus
Complete information technology josh(at)agliodbs(dot)com
and data management solutions (415) 565-7293
for law firms, small businesses fax 621-2533
and non-profit organizations. San Francisco

In response to

  • Backup automation at 2001-12-08 01:45:17 from Aarni Ruuhimäki / Megative Tmi / KYMI.com

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Stephan Szabo 2001-12-10 21:33:54 Re: [SQL] Can anybody help me with SQL?
Previous Message Josh Berkus 2001-12-10 19:40:19 Re: odbc-connect