LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 06-06-2005, 07:04 PM   #1
SharkBait
LQ Newbie
 
Registered: Feb 2005
Posts: 27

Rep: Reputation: 15
Cron Jobs with MySQL


Hello,

I am curious, how difficult is it to set up a Cron Job that backs up particular MySQL Databases and then FTP over to another server which gets a tape backup daily?

I have 1 server that I need to export a couple MySQL databases daily at a set time (which I know Cron can do nicely as I use it to execute some php scripts) to a Windows based server that does the tape backup?

Though I have another linux box (this one) which I could also have the first server send its backup to and then have this one write to a CD or something.

Any advice, help etc is greatly appreciated, I am getting tired of manual backups

Cheers,
 
Old 06-07-2005, 01:23 AM   #2
tkedwards
Senior Member
 
Registered: Aug 2004
Location: Munich, Germany
Distribution: Opensuse 11.2
Posts: 1,549

Rep: Reputation: 52
Code:
mysqldump --password=password --all-databases | gzip > /home/tim/mysqlbackup.sql.gz
To script an ftp upload see man lftp. It should be fairly simple to write an lftp command script to 'put' the file to the Windows FTP server and then run it using lftp -f. If you google I'm sure you'll find some examples.
 
  


Reply



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
Cron Jobs XaViaR Linux - General 1 06-23-2005 06:57 PM
cron jobs working2hard Linux - Software 0 07-28-2004 05:31 PM
CRON Jobs scottpioso Linux - Software 63 11-28-2003 06:45 PM
Linux Cron Jobs dibyendra Programming 0 08-19-2003 09:20 PM
cron jobs Zyanid Linux - Software 0 08-27-2002 05:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva

All times are GMT -5. The time now is 06:55 AM.

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
Open Source Consulting | Domain Registration