Skip site navigation (1) Skip section navigation (2)

Re: Create Linux Script for PostgreSQL database backup

From: tim hall <tech(at)glastonburymusic(dot)org(dot)uk>
To: Lawrence C <research_2004(at)yahoo(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Create Linux Script for PostgreSQL database backup
Date: 2004-09-02 06:44:03
Message-ID: 200409020744.03552.tech@glastonburymusic.org.uk (view raw or flat)
Thread:
Lists: pgsql-admin
Lawrence C,
On Wednesday 01 September 2004 14:20, you went:
> Anyone good in writing Linux scripting for backup
> PostgreSQL. I just required a simple scripts only.
>
> Normally we do the manual ways as following:
>
> In root
>
> root# su - postgres
> bash# pgdumpall >  backup.sql
> bash# exit
> root#
>
> I'm planning to write script.sh for cronjob but not
> too sure about it. Can anyone contribute the scripts
> for me?

Er ...

#! /usr/bin/bash
pgdumpall >  backup.sql

I'm being cheeky, but surely if you set that up as a cronjob for user 
'postgres' that would do it? Are your needs more complex than this?

cheers

tim hall

In response to

Responses

pgsql-admin by date

Next:From: Kaolin FireDate: 2004-09-02 06:56:43
Subject: Re: Create Linux Script for PostgreSQL database backup
Previous:From: Adi AlurkarDate: 2004-09-02 00:59:56
Subject: Dump/Restore vs Vacuum Full

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group