Re: cron & backup

From: Allen <dba(at)girders(dot)org>
To: v(dot)demartino2(at)virgilio(dot)it
Cc: postgresql <pgsql-general(at)postgresql(dot)org>
Subject: Re: cron & backup
Date: 2005-01-18 23:30:32
Message-ID: 41ED9C18.9050608@girders.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I had a problem in the past with the vaccumdb command on 7.2.3
mysteriously never returning when run from cron on FreeBSD, but it ran
fine from cmdline. Had to be an environmental issue. Not having time to
track it down, I tried an alternative lazy method...

/usr/local/bin/vacuumdb -z -f dbname <-- sometimes never returned

/usr/local/bin/psql -c "vacuum full analyze;" dbname <-- worked

Though I would really prefer to know *what* the problem was so it
wouldn't happen elsewhere. For me the path was specified, but since the
job never terminated, I received no email. If you find the reason, post it!

Good luck!
Allen

v(dot)demartino2(at)virgilio(dot)it wrote:
> At office we have a Win2k LAN to which my freebsd postgresql server box
> is connected via Samba. On this box I have a script, called 'crono', which
> is dealt by /usr/bin/cron every working day's night at 1 am. As you can
> see below this crono script vacuums all the DBs and dumps mydb to a samba
> share.
>
> ##crono file
> vacuumdb -a -U victor
> pg_dump --create --format=c -O -Uvictor --file=/root/my_dump/mydb.sql.gz
> mydb
> ##
>
> Now if I execute the script by hand as root it all works smoothly but cron
> fails frequently to start or complete the execution of the script even though
> in the cron log I see that it starts it regularly as root at 1 am.
>
> The fact is that I don't have any other clue on what is going wrong because
> of the poor log.
>
> What logs shoiuld I enable in the postgresql.conf configuration file to
> trace what's going on with the vacuumdb and pg_dump commands?
>
> Ciao
> Vittorio
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ron Mayer 2005-01-19 00:36:21 Is initdb needed from 8.0.0rc3 to 8.0.0?
Previous Message Lonni J Friedman 2005-01-18 22:47:33 Re: Backup strategy