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

Re: [GENERAL] backup of postgres scheduled with cron

From: "Sorin N(dot) Ciolofan" <ciolofan(at)ics(dot)forth(dot)gr>
To: "'Frank Wittig'" <fw(at)weisshuhn(dot)de>
Cc: <pgsql-admin(at)postgresql(dot)org>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: [GENERAL] backup of postgres scheduled with cron
Date: 2007-11-22 14:15:10
Message-ID: 20071122141513.B6F2E8E40FC@mailhost.ics.forth.gr (view raw or flat)
Thread:
Lists: pgsql-adminpgsql-general
Thank you all,

Yes, I used the absolute path in my script and now works ok :-)

Thank you again
Sorin

-----Original Message-----
From: pgsql-general-owner(at)postgresql(dot)org
[mailto:pgsql-general-owner(at)postgresql(dot)org] On Behalf Of Frank Wittig
Sent: Thursday, November 22, 2007 4:01 PM
To: Sorin N. Ciolofan
Cc: pgsql-admin(at)postgresql(dot)org; pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] backup of postgres scheduled with cron

Hello Sorin!

Sorin N. Ciolofan wrote:

> 	#!/bin/bash
> 	time=`date '+%d'-'%m'-'%y'`
> 	cd /home/swkm/services/test
>       pg_dump mydb > mydb_dump_$time.out

You should output STDERR to some error logfile or set MAILTO in your
crontab.
I guess you then would have seen an error message saying that pg_dump
was not found because cron doesn't load the users environment and
therefore PATH variable isn't set.
I suggest you call pg_dump in your script by absolute path.

Greetings,
Frank Wittig




In response to

pgsql-admin by date

Next:From: Andrew SullivanDate: 2007-11-22 14:49:43
Subject: Re: [GENERAL] backup of postgres scheduled with cron
Previous:From: Martin GaintyDate: 2007-11-22 14:14:13
Subject: Re: [GENERAL] backup of postgres scheduled with cron

pgsql-general by date

Next:From: Andrew SullivanDate: 2007-11-22 14:49:43
Subject: Re: [GENERAL] backup of postgres scheduled with cron
Previous:From: Martin GaintyDate: 2007-11-22 14:14:13
Subject: Re: [GENERAL] backup of postgres scheduled with cron

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