Cron deamon

Michal Čumpl michal.cumpl at gmail.com
Thu Jun 2 10:31:08 CEST 2005


Zkus tam dat celou cestu /usr/local/bin/mysqldump a uvidis ;)

On 02 Jun 2005 09:53:43 +0200 (CEST), Peter Novak <novak71 at post.sk> wrote:
> Zdravim Vas,
> potrebujem cez cron spustat zalohovaci skript. Manualne spustenie skriptu
> funguje v poriadku, ale spustenie cez cron nefunguje, konkretne "mysqldump".
> 
> ********** prava skriptu :
> -rwx------  1 root  wheel  685  2 jún 08:39 zalohujdb.sh
> 
> 
> ********** doplnene do  /etc/crontab na zalohu raz za den vzdy o 10.00
> 1       10      *       *       *       root    /usr/backup/zalohujdb.sh
> 
> 
> ********** skript "zalohujdb.sh":
> #!/bin/sh
> MENO_SUBORU=db_`date +%d%m%y`
> cd /usr/backup
> echo ====== Zalohujem databazu =======
> mysqldump -uoperator -pxxxxxxx obchod > $MENO_SUBORU.sql
> echo ====== Zipujem databazu =======
> tar -zcvf $MENO_SUBORU.tgz $MENO_SUBORU.sql
> echo ====== Mazem .sql subor =======
> rm $MENO_SUBORU.sql
> echo ====== Odpajam CD =======
> umount /cdrom
> echo ====== Vytvorim iso subor z tgz =========
> mkisofs -o $MENO_SUBORU.iso -J -R $MENO_SUBORU.tgz
> echo ====== Napalujem data v multisession mode =========
> burncd -m -f /dev/acd0 -s 10 data $MENO_SUBORU.iso fixate
> echo ====== Mazem .iso subor =======
> rm $MENO_SUBORU.iso
> 
> 
> ********** Vysledok zalohy odoslanaj cronom na e-mail :
> ====== Zalohujem databazu =======
> mysqldump: not found
> ====== Zipujem databazu =======
> tar: db_020605.sql: Could not stat: No such file or directory
> ====== Mazem .sql subor =======
> rm: db_020605.sql: No such file or directory
> ====== Odpajam CD =======
> umount: /cdrom: not a file system root directory
> ====== Vytvorim iso subor z tgz =========
> mkisofs: not found
> ====== Napalujem data v multisession mode =========
> burncd: ioctl(CDRIOCWRITESPEED): Input/output error
> ====== Mazem .iso subor =======
> rm: db_020605.iso: No such file or directory
> ====== Pripajam CD ============
> cd9660: /dev/acd0: Input/output error
> 
> Preco cron nenasiel mysqldump ?
> Dakujem
> 
> ________
> Vsetci sa raz zideme na http://blog.sme.sk
> --
> FreeBSD mailing list (users-l at freebsd.cz)
> http://www.freebsd.cz/listserv/listinfo/users-l
>




More information about the Users-l mailing list