Pagina 1 di 1

crontab pg_dumpull errore

Inviato: mer 1 feb 2006, 15:06
da fabriBit
Ciao a tutti,
cerco di essere il più chiaro possibile:
ho la necessità di fare il backup del db MySQL e Postgres in modo automatico e quindi uso crontab..
Mysql funziona perfettamente...
il problema è postgres e vi incollo l'errore che ricevo in /var/spool/mail/root:

#######scusate la lunghezza##########

To: postgres@localhost.localdomain
Subject: Cron <postgres@bitsrv03> /home/postgres/backupDB.csh
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/usr/local/pgsql>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=postgres>

creazione directory backup dati in corso...
mkdir: cannot create directory `backup': Il file esiste
------------------------------
directory locale gia esistente
------------------------------
touch: creating `DBSI01-02-2006_12-05.dump': Permission denied
chmod: getting attributes of `DBSI01-02-2006_12-05.dump': No such file or directory
/home/postgres/backup/DBSI01-02-2006_12-05.dump: Permission denied.
Backup Postgres SI del 01-02-2006_12-05

--------------------------------
backup Database non eseguito
--------------------------------
chmod: changing permissions of `DBSI01-01-2006_01-05.dump': Operation not permitted
chmod: changing permissions of `DBSI01-02-2006_01-05.dump': Operation not permitted

Re: crontab pg_dumpull errore

Inviato: mer 1 feb 2006, 16:29
da -Shark-
fabriBit ha scritto: mkdir: cannot create directory `backup': Il file esiste
------------------------------
directory locale gia esistente
------------------------------
Come dice la dir sembra già esserci...
touch: creating `DBSI01-02-2006_12-05.dump': Permission denied
chmod: getting attributes of `DBSI01-02-2006_12-05.dump': No such file or directory
/home/postgres/backup/DBSI01-02-2006_12-05.dump: Permission denied.
Backup Postgres SI del 01-02-2006_12-05

--------------------------------
backup Database non eseguito
--------------------------------
chmod: changing permissions of `DBSI01-01-2006_01-05.dump': Operation not permitted
chmod: changing permissions of `DBSI01-02-2006_01-05.dump': Operation not permitted
Per tutto il resto quà il problema è di permessi! Il touch non va a buon fine, e poi il chmod non trova il file, quindi controlla che la directory in questione abbia i permessi di scrittura! :-)

Re: crontab pg_dumpull errore

Inviato: mer 1 feb 2006, 17:56
da fabriBit
-Shark- ha scritto:
fabriBit ha scritto: mkdir: cannot create directory `backup': Il file esiste
------------------------------
directory locale gia esistente
------------------------------
Come dice la dir sembra già esserci...
touch: creating `DBSI01-02-2006_12-05.dump': Permission denied
chmod: getting attributes of `DBSI01-02-2006_12-05.dump': No such file or directory
/home/postgres/backup/DBSI01-02-2006_12-05.dump: Permission denied.
Backup Postgres SI del 01-02-2006_12-05

--------------------------------
backup Database non eseguito
--------------------------------
chmod: changing permissions of `DBSI01-01-2006_01-05.dump': Operation not permitted
chmod: changing permissions of `DBSI01-02-2006_01-05.dump': Operation not permitted
Per tutto il resto quà il problema è di permessi! Il touch non va a buon fine, e poi il chmod non trova il file, quindi controlla che la directory in questione abbia i permessi di scrittura! :-)
Grazie ho risolto...
era un problema di proprietario della directory....
mi è bastato che postgres diventasse il proprietario della directory backup e del suo contenuto.... :D