Hello guys,
at first i am new with freebsd so please be kind
I made a small script to backup some mysql databases.
Its something like:
If i execute the shell script without a cronjob, everything is working fine.
Thats how i made the cronjob:
The cronjob is executin, that tar.gz file is there. But all the databases have 0 Byte.
Any ideas? Would be rly cool!
Greets
Paul01
Excuse my English hehe
at first i am new with freebsd so please be kind

I made a small script to backup some mysql databases.
Its something like:
Code:
#!/bin/sh
cd /root/backup
mysqldump -uroot -p'somecoolstuff' database1 > database_1.sql
mysqldump -uroot -p'somecoolstuff' database2 > database_2.sql
mysqldump -uroot -p'somecoolstuff' database3 > database_3.sql
mysqldump -uroot -p'somecoolstuff' database4 > database_4.sql
mysqldump -uroot -p'somecoolstuff' database5 > database_5.sql
tar cfvz datenbank`date +%d-%m-%y_%H:%M`.tar.gz database_*.sql
rm -rf database_*.sql
If i execute the shell script without a cronjob, everything is working fine.
Thats how i made the cronjob:
Code:
nano /etc/crontab
0 * * * * root /root/backup/backupDatenbank.sh
The cronjob is executin, that tar.gz file is there. But all the databases have 0 Byte.
Any ideas? Would be rly cool!
Greets
Paul01
Excuse my English hehe