LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 03-23-2012, 12:39 AM   #16
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.6, Centos 5.10
Posts: 16,324

Rep: Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041

In that case, we've proved there's nothing wrong with cron

So, use
Code:
which mysqldump

# gives on my system
/usr/bin/mysqldump
So (replacing the 'echo' cmds) your backup script would look like
Code:
#!/bin/bash
/usr/bin/mysqldump -u dbuser -pdbpass dbname > /tmp/dbname_backup.sql 2>&1
on my system, should give either the backup or the error msg into that file

Last edited by chrism01; 03-23-2012 at 12:40 AM.
 
1 members found this post helpful.
Old 03-23-2012, 12:18 PM   #17
ymnoor21
LQ Newbie
 
Registered: Mar 2012
Posts: 8

Original Poster
Rep: Reputation: 0
Talking

Quote:
Originally Posted by chrism01 View Post
In that case, we've proved there's nothing wrong with cron

So, use
Code:
which mysqldump

# gives on my system
/usr/bin/mysqldump
So (replacing the 'echo' cmds) your backup script would look like
Code:
#!/bin/bash
/usr/bin/mysqldump -u dbuser -pdbpass dbname > /tmp/dbname_backup.sql 2>&1
on my system, should give either the backup or the error msg into that file
Excellent, finally the backups are getting created via cronjob. Thanks Chris!!! Its been tough days for me.

Thanks
Yamin
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] find in bash script returns "missing argument to `-exec'" while cmd runs fine zhjim Programming 11 01-31-2012 09:56 AM
[SOLVED] Bash script problem "No such file or directory" cnmoore Programming 23 03-31-2011 04:55 PM
[SOLVED] Errors executing shell script: "command not found" and "no such file or directory" eko000 Linux - Newbie 1 01-14-2011 08:54 AM
[SOLVED] "!#/bin/bash: No such file or directory"? When running a script C_Blade Linux - Newbie 12 04-08-2010 11:15 PM
Grep in bash script returns "No such file or directory", works manually gizza23 Programming 7 02-25-2010 05:37 PM


All times are GMT -5. The time now is 04:33 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration