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 04-05-2012, 01:04 PM   #1
iamtroberts
LQ Newbie
 
Registered: Jan 2011
Posts: 2

Rep: Reputation: 0
How would I create a cron job to backup all of my MySQL Databases and save to a file?


I am using Rhel 5.6, examples would be great, but a concise explanation of what the command is doing would be appreciated so I am not just copying something, I'm understanding and learning.

Thanks!
 
Old 04-05-2012, 01:43 PM   #2
SAbhi
Member
 
Registered: Aug 2009
Location: Bangaluru, India
Distribution: CentOS 6.5, SuSE SLED/ SLES 10.2 SP2 /11.2, Fedora 11/16
Posts: 664

Rep: Reputation: 81
Quote:
Originally Posted by iamtroberts View Post
I am using Rhel 5.6, examples would be great, but a concise explanation of what the command is doing would be appreciated so I am not just copying something, I'm understanding and learning.

Thanks!
so dat good u r doing....

u didnt specified your problem wat do u exactly want by this thread.
 
Old 04-10-2012, 06:34 PM   #3
iamtroberts
LQ Newbie
 
Registered: Jan 2011
Posts: 2

Original Poster
Rep: Reputation: 0
Sorry about that, I posted the problem in the title not the body of the post. So here's my question: How would I create a cron job to backup all of my MySQL Databases and save to a file?
 
Old 04-10-2012, 07:12 PM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
SAbhi. Please post in english and not text speak.

You can download the graphical MySQL management gui tool and schedule backup jobs. You can run it on a different computer that has a GUI. Either Linux or Windows.

The MySQL Administrator's Guide lists three methods for backups.
1) mysqldump --tab-/path/to/some/dir --opt db_name

2) mysqlhostcopy db_name /path/to/some/dir

3) Copying the *.frm, *MYD and *.MYI files (but not for InnoDB tables)

Consider buying the MySQL Administrator's Guide book. It lists other files you should backup in case of an emergency.
Also download the Manual from the website. It contains information about security that you must read.

The "man 5 crontab" man page contains an example crontab. This is the file read by cron that tells it what and when to run. For SE Linux, you will need to read Red Hats documentation. For MLS mode, you need to do more. The man 5 crontab manpage has a paragraph on SE Linux, including the commands, and a sample crontab.
 
  


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
How do you create a cron file that will regularly perform a level 0 backup once per month? cadre41 Linux - Newbie 2 03-04-2011 10:44 AM
MySQL backup cron job not executing correctly lakridserne Linux - Server 3 03-02-2011 09:10 AM
cron job to create and move backup from ubuntu to windows. onlykishore07 Linux - Newbie 1 06-15-2010 01:49 PM
How to improve my mysql backup cron job stardotstar Programming 8 05-25-2006 06:11 AM
How to create cron job to empty mbox folder/file sjmo2 Linux - General 4 03-23-2006 02:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:52 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration