Go Back  DVD Talk Forum > General Discussions > Tech Talk
Reload this Page >

Automated MySQL backup question...

Tech Talk Discuss PC Hardware, Software, Internet and Other Technology

Automated MySQL backup question...

Old 01-17-05, 12:15 PM
  #1  
DVD Talk Platinum Edition
Thread Starter
 
Join Date: Dec 2002
Location: NJ
Posts: 3,337
Likes: 0
Received 0 Likes on 0 Posts
Automated MySQL backup question...

I decided that I need to setup an automated back up of on of my MySQL databases. I have found plenty of PHP scripts that can be run via a cron job, but they all seem to dump the SQL file on the server. What I am looking for is a simple script that will just email the backup files to an email address that I specify.

I found one that looks to be perfect, phpMySQLAutoBackup, the only problem is that it uses IonCube PHP Encoder and my host doesn't have that installed on the servers.

Anyone know of any scripts that will do this? Preferably something I can set up to run every day or so as a cron job.
Old 01-17-05, 12:41 PM
  #2  
Member
 
Join Date: Jan 2002
Location: NYC
Posts: 155
Likes: 0
Received 0 Likes on 0 Posts
## in your crontab ##
5 0 * * * mysql_dump ... > filename
6 0 * * * mail [email protected] < filename

This is of course, very simplified, but I think this could work, no? The file does sit on the server tho. It's probably possible to just pipe the output of the script directly to email, as well.

Last edited by zutroy; 01-17-05 at 12:45 PM.
Old 01-17-05, 02:32 PM
  #3  
Senior Member
 
Join Date: Oct 2000
Location: Addison, TX
Posts: 905
Likes: 0
Received 0 Likes on 0 Posts
How big is your database? You could quickly have the email server start bouncing the email because of size limitations. Can you dump the file to a directory and then have a backup process copy it to tape or another machine?
Old 01-17-05, 04:46 PM
  #4  
DVD Talk Platinum Edition
Thread Starter
 
Join Date: Dec 2002
Location: NJ
Posts: 3,337
Likes: 0
Received 0 Likes on 0 Posts
Zutroy, I will have to try that. It looks like it should work, but I would think I woul dhave come across that already in my searches. I will give it a whirl though.

Shay, the database currently is very small, a few k. I am not too concerned with size at this point because even if it is several megs it will be fine. I have unlimited email size so I don't think it will be a problem. I am not in charge of the server that the site is hosted on so I don't know what I can do in terms of tape backups and the like.

It is just buggin me that their are so many ready made PHP scripts that will dump the file onto the server, but nothing easily available to send as an email. Except for two that I have found so far that just didn't seem to work right.

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 On
HTML code is On
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Thread Tools
Search this Thread

Archive - Advertising - Cookie Policy - Privacy Statement - Terms of Service - Do Not Sell My Personal Information -

Copyright 2021 MH Sub I, LLC dba Internet Brands. All rights reserved. Use of this site indicates your consent to the Terms of Use.