Server :: MySQL Backup Cron Job Not Executing Correctly?

Mar 2, 2011

I own a CentOS 5 VPS. I typed crontab -e, and then I added the following line to automatically have my server backup mysql

0 * * * * mysqldump -u root -p password --all-databases | gzip > /home/dbbackup/database_`date '+%m-%d-%Y_%H'`.sql.gz

When I go in and look, it doesn't place any files in /home/dbbackup. When I run

mysqldump -u root -p password --all-databases | gzip > /home/dbbackup/database_`date '+%m-%d-%Y_%H'`.sql.gz

View 3 Replies


ADVERTISEMENT

Server :: Recover MySQL Innodb From /var/lib/mysql/ Backup?

Jan 30, 2011

I installed mediawiki the other day and went with the default innodb option. However a week later something went wrong. And since I have scripts that nightly backup /var/ I just copied the backup of /var/lib/mysql/wikidb/ (as I've done with MyISAM). Then when I connect the wikidb database. I can see the tables (via "show tables"), but when I do any query with them (check table X, select * from X) I get:

Code:

Table 'wikidb.X' doesn't exist I've since read that can can't just copy the database directory like MyISAM, and there appears to be no way that I can find to restore or fix Innodb, without a dump of the data. And I never got a chance to do a mysqldump of the data. So has anybody got any idea how I can at least view the "page" table from the files I've backed up in /var/lib/mysql/wikidb/ ?

View 1 Replies View Related

Server :: Directory Backup Cron Script?

Oct 24, 2009

What's a good cron script for backing up and zipping a directory of files, or multiple directories with files, to a backup directory on my server, on a daily basis?I found an easy to use mysql backup script, now I need to backup my site directory, but not all the directories in it. So I need a method in the script to omit certain directories from backing up, ie dirs that contain gigs worth of files.This seems like it should be one of the most common crons to set a server up with but two pages deep in google (and here) I have yet to find anything remotely resembling a solution.

View 9 Replies View Related

Server :: Cron Backup Failing / Need To Browse Tape

Feb 9, 2010

we have a server that runs a backup (cron job) at 9:15 every night. When I log on in the morning I have mail message that gives me a long list of all the files that were backed up the night before. For a couple of weeks now, the mail message gives me an empty list. Yet, when I run the same job manually from a #prompt, it runs. I am not able to run this job with cron in the daytime because too many users are in it. I wanted to browse the tape to see if the backup is really failing to copy the files or if they are on the tape and the mail message is bogus.

Since the backkup was done with cpio instead of tar, I'm not sure if I can browse the tape with restore -i anyway.What would be the best way to browse the tape on /dev/rmt/1 without actually restoring anything ?This is an ancient DGUX system, not Linux, and I'm not a unix expert I just inherited this server recently, but a lot of things are very similar to Linux and it looked like this might be a good place to ask.

View 3 Replies View Related

CentOS 5 Server :: PHP 5.3 And MySQL - Webpages Not Loading Correctly

Oct 8, 2010

I am running CentOS 5.2 with php5.3 and Mysql. I am running a CRM program called Sugar on the server and I am having a problem where the webpages don't always load correctly. I am not sure if this is something on the program itself or if there is a problem some or other setting on the webserver. I am accessing the server over a local network so I don't think it is connection issues. The server has a static IP.

View 10 Replies View Related

Debian :: Executing Scripts From Cron ?

Oct 1, 2009

I am adding the following scripts to cron via crontab -e (as user)

Quote:

The first one is to record tv. I've added dev/null 2>&1 at the end. No too clear why but without it, it records only a few seconds.

The second script is (as you should already noticed) to turn off my computer at 6:25 am. It doesn't work (with or without dev/null 2>&1). I am surely forgetting something important. Could you please tell me what is it?

View 6 Replies View Related

CentOS 5 :: Cron Entries Not Executing?

Jun 2, 2010

I'm trying to add several cron jobs. I have a folder (/etc/cron.myapp) with several subfolders in it (30minute, 3minute, daily, hourly). Each of these folders contains a script.Runnng/usr/bin/run-parts /etc/cron.myapp/3minute/will execute the contents of that folder.I have tried adding the following entries to /etc/crontab with no luck, and nothing is showing up in /var/log/cron

*/3 * * * * /usr/bin/run-parts /etc/cron.myapp/3minute/
*/3 * * * * /usr/bin/run-parts /etc/cron.myapp/3minute
*/3 * * * * root /usr/bin/run-parts /etc/cron.myapp/3minute/

[code]....

View 3 Replies View Related

Server :: Tar Backup And Restore In Mysql?

May 6, 2011

how to take tar backup and restore in mysql,Iam new to mysql,i searched in google but i did not get the exact one.

View 4 Replies View Related

Ubuntu :: Cron Script Not Properly Executing?

Jun 5, 2010

so sorry about this seemingly silly cron question. I know a lot are asked, and are usually just environment related.Anyway, I wrote a very simple PHP script to mount my external drive to a specific location as soon as it's switched on.The script works great when run.What's strange, is that it runs in cron and generates a log file, but for someone reason doesn't mount the drive when cron runs itI added in the full path to EVERYTHING in the script, and I'm calling it with the full path from crontab, but it doesn't mount my drive when run from cron.I've tried running the individual commands on the cmd, and it all works.

View 9 Replies View Related

General :: Ssh'ing To A Host And Executing A Command Not Working Correctly?

Aug 20, 2010

I have the following command:ssh $USER@$HOST "ls /ops/pkg/ec/`grep "PKRTS" /ops/pkg/ec | awk '{print $1}'`* > /tmp/tmp_file"What the above SHOULD do..is, ssh to the host then execute the command.The command should first execute the grep and awk between the back ticks, and generate a file name, then ls using that filename* and write that data to a temp file.However, it executes the grep and awk before even SSH'ing and the command that goes to the server is simply an "ls /ops/pkg/ec/* > /tmp/tmp_file" since the grep and awk return nothing on the local machine.

View 1 Replies View Related

Server :: Mysql Backup And Restore Scripts?

Apr 11, 2011

writting shell scripts,i searched in google but could not get the exact,pls can anyone help how to take mysql backup & restore using shell scripts.

View 3 Replies View Related

Server :: Recover A Compressed Mysql Backup?

Dec 6, 2009

I'm trying to recover a compressed mysql backup. As the backup is extremely large, I dont wanna decompress it before importing. How can I make a mysql variable take effect before I load this compressed file into the database.

View 7 Replies View Related

Ubuntu :: Cron Daemon Is Running But The Command Isn't Executing?

Mar 28, 2011

I was just curious if cron had to be enabled before use. i have a crontab, and the cron daemon is running, but the command isn't executing...

View 9 Replies View Related

Server :: Stop Mysql In Order To Preform A Backup?

Apr 12, 2010

I'm working on an old redhat server with mysql installed and I need to find a way to stop the service in order to preform a backup.

some info that I found on the server code...

View 9 Replies View Related

Fedora :: Cron Job (Play Media File At Certain Time) Not Executing

Nov 6, 2009

I wanted to use cron to play a media file at a certain time (i.e. use it as an alarm clock). However it seems to do nothing. The contents of my crontab is:

SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/

# For details see man 4 crontabs
# Example of job definition:
# .---------------- minute (0 - 59)
# | .------------- hour (0 - 23)
# | | .---------- day of month (1 - 31)
# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# | | | | |
# * * * * * command to be executed
5 11 * * * env DISPLAY=:0.0 /usr/bin/totem /path_to_file

View 2 Replies View Related

Server :: MySQL Backup - Deal With Large Amounts Of Data?

Feb 15, 2011

we've been trying to become a bit more serious about backup. It seems the better way to do MySQL backup is to use the binlog. However, that binlog is huge! We seem to produce something like 10Gb per month. I'd like to copy the backup to somewhere off the server as I don't feel like there is much to be gained by just copying it to somewhere else on the server. I recently made a full backup which after compression amounted to 2.5Gb and took me 6.5 hours to copy to my own computer ... So that solution doesn't seem practical for the binlog backup.Should we rent another server somewhere? Is it possible to find a server like that really cheap? Or is there some other solution? What are other people's MySQL backup practices?

View 8 Replies View Related

Ubuntu Servers :: Mysql-admin Won't Schedule Backup But Will Manual Backup

Jan 19, 2010

I have a scheduled backup to run on our server at work and since the 7/12/09 it has be making 592k files instead of 10Mb files, In mysql-admin (the GUI tool) I have a stored connection for the user 'backup', the user has select and lock rights on the databases being backed up. I have a backup profile called 'backup_regular' and in the third tab along its scheduled to backup at 2 in the morning every week day. If I look at one of the small backup files generated I see the following:

Code:

-- MySQL Administrator dump 1.4
--
-- ------------------------------------------------------
-- Server version`

[code]....

It seems that MySQL can open and write to the file fine, it just can't dump

View 3 Replies View Related

Ubuntu Servers :: Make Sure Cron Job Copies Files Correctly

Jul 1, 2010

I made a Bash script that is fired by a Cron job every morning. It dumps an SVN backup on some Samba shared drive. I would like to know how I can make sure the job worked correctly without having to verify the shared drive every morning. Right now, I take the job's output, save it to a log file and send this file by email. But the ouput isn't so great.

[Code]....

View 2 Replies View Related

Ubuntu :: Setting Up A Cron Job Creates A Tunnel To Remote Machine To Work Correctly On 9.10?

Jan 12, 2010

I am having some trouble setting up a cron job that creates a tunnel to my remote machine to work correctly on Ubuntu 9.10. The setup looks like the following:

(1) myscript.sh (executable)
Code:
#!/bin/bash
ssh -2 -x -i /home/user/.ssh/id_rsa.prv -L 3128:myremotemachine:3128 myaccount@myremotemachine
(2) crontab -e, added the following lines:

[Code]...

View 5 Replies View Related

General :: DB Backup With Cron From Sh Script?

Jun 8, 2009

Maybe this is a MySQL question, maybe not...

I've written a shell script to back up a database.

But when I run it, it prompts for password even though the script provides it. If I'm doing this manually, it's not a problem, but I want to make a cron job to do it...

Here's the script: Quote: #!/bin/bash
set -xv
#First let's rotate the backup files...
/bin/mv /home/cabazio/someDB-3.tar.gz /home/some/someDB-4.tar.gz
/bin/mv /home/some/someDB-2.tar.gz /home/some/someDB-3.tar.gz

[Code]....

View 2 Replies View Related

Ubuntu :: Simple Cron Job Backup ?

May 4, 2010

i am very sorry if this has been asked before... i'm sure it has.. but i have searched all over the net looking for an answer and i still cant find it...

I have a really simple cron job script like this:

When i run this manually it works fine but when i run it from my ROOT user in Plesk as a cron task is always creates a file that is just 45 bytes. Why doesn't it work... I am running it as a root user.. so surely i must have permission to access the file?

View 7 Replies View Related

General :: Cron Backup Job Fails To Run?

Jan 5, 2011

I'm having a small issue where the backup jobs that I set to run in the crontab of the backup user do not appear to be running. Here's how I set it up (with crontab -e as the backup user):

run amanda every night (check at 2:45 and backup at 3)

[code]...

View 5 Replies View Related

OpenSUSE Network :: ERROR 2002 (HY000): Can't Connect To Local MySQL Server Through Socket '/var/mysql/mysql.sock

Jun 7, 2011

I think this goes here, but I'm not sure. I decided that XAMPP had been troublesome enough. MySQL never worked. So I decided to instal the LAMP stack offered by YaST. I went about installing it thinking that it would all work. But it seems that I was wrong. So I try to start mysql, and here's what I get:

Code:
the-matrix:~ # mysql start
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2) or
Code:
the-matrix:~ # rcmysql start
Starting service MySQL warning: /var/mysql/mysql.sock didn't appear within 30 seconds
chmod: cannot access `/var/run/mysql/mysqld.pid': No such file or directory

[Code]...

View 6 Replies View Related

Ubuntu :: Setup A Simple Backup Cron Job

Jun 10, 2010

I'm trying to set up a simple backup script with cron.

In "crontab -e" (and sudo crontab-e - I tried both) I enter "0 22 * * * /home/USERNAME/.backup.sh", with the hope that it will run the script at 10pm each day. The srcipt work fine if I run in a terminal. why it won't work? It's bound to be something obvious....

View 5 Replies View Related

General :: Can't Connect To Local MySQL Server Through Socket '/var/lib/mysql/mysql.sock' (2)

Jun 2, 2010

i am using liferay5.2(mysql included in the download pack) on fedora. while liferay is working fine but i cannot connect to mysql.i am getting the error

[
[root@localhost ~]# ln -s /var/lib/mysql/mysql.sock /tmp
[root@localhost ~]# /etc/init.d/mysqld start
Timeout error occurred trying to start MySQL Daemon.

[code]....

i didnt find the mysql.sock file in the location /var/lib/mysql/mysql.sock. i cannot find the portal-ext.properties file also to make intial settings.

View 9 Replies View Related

Debian Configuration :: Can't Get Cron-fired Backup Scripts To Run

Oct 15, 2010

Due to a disk crash I've had to rebuild my Debian Lenny system. For some reason I can't get my cron-fired backup scripts to run. They will run manually.

It looks like crond is not running. If I try to start it, here's what I get:

Pancho:/home/lloyd# /etc/init.d/cron start
Starting periodic command scheduler: crond failed!

MORE INFO:

lloyd@Pancho:~$ /etc/init.d/cron start
Starting periodic command scheduler: crond/etc/init.d/cron: line 54: start-stop-daemon: command not found
failed!

[Code].....

Clearly the problem failure to find start-stop-daemon is not the problem and I'm still in the dark.

View 2 Replies View Related

Ubuntu :: Cron - Backup Runs To Have Incremental Number

Apr 3, 2010

I am trying to write as bash script in order to have backup done by cron on the webhosting server. I want all backup runs to have incremental number in front of them. I came up with an idea to store incremental number of a backup in txt file on a server so when next one runs is can check the number in the file. However I am having terrible issues. My script:

[code]....

View 7 Replies View Related

Ubuntu :: CRON - Backing Up MySQL Databases?

Sep 18, 2010

Trying to set up a backup for mySQL databases in CRON.

I've entered the following line in /etc/crontab:

Code:
7 13 * * * root mysqldump -u root -pMYPASSWORD --all-databases | gzip > /home/myuser/mysql_backups/database_`date '+%Y-%m-%d'`.sql.gz
grep CRON /var/log/syslog shows:

[Code].....

If I run the command outside of CRON, it creates the backups no problem, but CRON is not doing anything.

View 3 Replies View Related

Fedora :: Cron Backup Permission Denied On External Drive?

Aug 28, 2010

I have a cron backup scheme in which I rsync, then tar, then copy files on my internal hard drives to an external (USB) drive. When it works, it works. But I often get a "Permission Denied" message for all of these tasks. how the external drive is auto-mounted so I edited the etc/fstab so that the owner of the cron job is also the owner of the external drive (I think. Unfortunately, I'm not at that machine right now (it's at work), I can't give the exact fstab line (I will post it as an update to this thread next time I am at the machine).) BUT, I still get times when the cron backup runs fine and other times I get the Permission Denied. This is a shared machine that is dual-booted, so what I *think* is going on is that when the machine is rebooted to Fedora, but nobody logs in, I get a Permission Denied for the cron backup. It seems like on days when someone has logged in as the main user and left without logging out that the cron backup runs fine.

View 8 Replies View Related

OpenSUSE Install :: Mount - Run Cron To Backup Home Folder?

Jan 4, 2010

I installed a second HD, and formatted it to ext4. I gave it the "/backup" label. I am trying to figure out how to mount it so that I can run cron to backup my home folder onto it once a week. This is what the fstab looks like now

[code]...

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved