1
vote
1answer
58 views

Issues with MySQL restart on running through a crontab scheduler

I have written a shell script which starts MySQL when its killed/terminated. I am running this shell script using a crontab. My cron looks for the script file named mysql.sh under /root/mysql.sh ...
0
votes
2answers
478 views

Centos backup mysql using cron job

According to this tutorial http://www.a2hosting.com/kb/getting-started-guide/backing-up-your-data/backups-on-dedicated-servers-and-vps trying to backup mysql database I did: 1) created folders in ...
1
vote
3answers
441 views

How can I run a Cron job to make backups of a MySQL server by SSH

I have a production server running CentOS with a MySQL database. At home, I have a QNAP NAS (runs a little embed linux). I want to make a Cron job on my NAS to backup the data from my CentOS ...
0
votes
1answer
149 views

Mysql select query not generating result on cron but is ok via terminal

We have a C program (source is below). We compile it with: gcc -Wall -Wextra -g $(mysql_config --cflags) get1ReceiveSource.c $(mysql_config --libs) -lrt -o get1Receive The select give results ...
2
votes
1answer
257 views

Linux Nginx + php-fpm + cron + mysqld = always out of memory

I don't get it. I have a VPS with Nginx and php-fpm and MySQL. Should be very lightweight. No Apache, right? When I reboot, it is very lightweight. ~ 50/481 MB MEM usage. Very acceptable IMO. And ...
3
votes
2answers
224 views

“Unexpected EOF while looking for matching ``” on cron job

I set up a cron job on my server running RedHat 4.1 to backup MySQL databases, and then upload to Amazon S3. The goal is to drop the .bz2 file in a folder corresponding with the day of the week. ...
0
votes
2answers
212 views

Cronjob script won't pass in mysql password

I have a script called /etc/cron.daily/99loganalyzer_expire, which is as so: #!/bin/bash SQL="DELETE FROM SystemEvents WHERE ReceivedAt < DATE_SUB(CURDATE(),INTERVAL 30 DAY)" ...
4
votes
3answers
493 views

Store Cron Jobs into a database

In order to build a system to maintain thousands of cron jobs on a Linux system, I'm facing the problem of being able to handle them in a scalable way. I need to use a database (I was thinking of ...
1
vote
4answers
116 views

Running cronjob in the odd-numbered days

I'm currently running my MySQL backup script on every day of the week: 0 1 * * 1 sh /root/mysql_monday.sh 0 1 * * 2 sh /root/mysql_tuesday.sh 0 1 * * 3 sh /root/mysql_wednesday.sh 0 1 * * 4 sh ...
1
vote
7answers
485 views

mysql database daily backup on ubuntu server

I use crontab -e in ubuntu server for running a backup.sh file every night at 02:00 AM. I wrote: 00 02 * * * root /home/backup.sh Then /etc/init.d/cron restart When do crontab -l it shows:00 02 * * * ...
0
votes
3answers
268 views

throttle cpu usage for a cronjob

I've got a cronjob that is basically nothing more than mysqldump whatever | gzip > backup.sql.gz. The database is fairly big. I've noticed that while the job is running, my apache is much less ...
1
vote
1answer
148 views

Check if cron ran and have fallback

I have written a realtime bus tracking program that runs a cron every minute to check the service of the bus. In order to remove some server resources I am going to be creating an instance on PHPfog ...
0
votes
2answers
629 views

How to take mysql dump of the mysql db every hour

hey I am newbie to scripting in linux.I want to take a sqldump of my database every hour, I have gone thorough couple of blogs i was able to write a script which will take the dump of my database but ...
1
vote
2answers
268 views

Dealing with cron jobs and MySQL/CPU contention on a single dedicated server architecture

We have a single small EC2 instance where we run a front-end server (php5-fpm/nginx) but also a lot of fetching cron php scripts inserting a lot of data (2k+rows every ~15min) which seems to ...
0
votes
3answers
339 views

Cron job killing MySQL server

I have a CRON job calling a PHP script using wget; I've set it up like that as I have all the objects set up and can be used elsewhere in the site. Calling this PHP script by typing in the address ...
-1
votes
2answers
155 views

Parts of script not executing in cron [duplicate]

Possible Duplicate: executing a sh script from the cron I'm having issues with a script that I created and am trying to run via cron. The script works perfectly fine when manually executed, ...
0
votes
1answer
209 views

cron to merge xml into sqlite every two hours - lamp

I'm looking to auto pull an xml file from an offsite url and merge it into a sqlite db every two hours. The server is lamp. (If it is too difficult to do for sqlite, then merging the xml into a mysql ...
1
vote
1answer
803 views

Cron sync mysql tables

I have a remote server that needs to access my mysql database a lot. So I figured instead of sending a bunch of remote mysql commands it would be more effecient to sync the database to the remote ...
0
votes
1answer
1k views

Cron job using MySQL/PHP?

I have Ubuntu 10.04 server with Lightspeed (web server), PHP5, Mysql, TCPDF and sendmail i need to run the cron job for queue in case if any job is running already then it has to create queue, if not ...
1
vote
1answer
765 views

MySQL equivalent to .pgpass, or automatic authentication in a cron job for mySQL

I'm writing a bash script to back up my databases. Most are postgresql, and in postgres there's a way to avoid having to authenticate by creating a ~/.pgpass file which contains the postgres password. ...
7
votes
5answers
8k views

Using mysqldump in cron job without root password

If I login with the root password on my box I can simply type mysqldump --all-databases and I will get th expected "Dump". I setup a job in cron.daily to run and dump this to a backup drive. The ...
0
votes
2answers
250 views

Cron job to back up mysql

I have a Fedora server with a USB backup drive connected to it. I have managed to mount the drive and want to run a daily backup of my MySql database. I am completely new to cron jobs and really ...
1
vote
1answer
189 views

cronjob for mysqldump is giving error [duplicate]

I am using mysqldump command to take backup of my database. mysqldump --add-drop-table -u user -ppassword databasename > backup/mybackup_$(date +%d%m%Y_%H%M).sql and it works fine...But i want ...
0
votes
3answers
1k views

crontab for mysql database cleanup and backup

On my OpenBSD box I have the following crontab for user _mysql 0 4 * * * /backup/mysql_backup/mysql_backup.sh 0 9 * * 1 mysql -uroot -pMySQLpassword -e "purge master logs before ...