hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Programming Discussion : PHP Backup Script For Remote MySQL and Email it!
Reply

Programming Discussion Discussions related to web programming languages and other related issues. Topics may include configuration, optimization, practical usage and database connectivity.
Forum Jump

PHP Backup Script For Remote MySQL and Email it!

Reply Post New Thread In Programming Discussion Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 03-15-2011, 01:19 PM
senaia senaia is offline
Junior Guru
 
Join Date: Feb 2004
Location: Dubai
Posts: 176
Thumbs up

PHP Backup Script For Remote MySQL and Email it!


Hello,

Im looking for a simple php script that will be placed on a linux server. The script job would be to connect to mysql on a windows server, create a full backup for the database, then email me the backup. The script should run automaticly once a day.

Any ideas?
Thanks!

Reply With Quote


Sponsored Links
  #2  
Old 03-15-2011, 01:26 PM
cselzer cselzer is offline
Web Hosting Master
 
Join Date: Apr 2009
Location: Pittsburgh, Pennsylvania
Posts: 582
Would be more effective to use bash. I did a search on google and found a few for you that you can easily adapt that would email the contents... but email isn't really realistic imo, it would be best to mount a drive or upload remote (preferably a cloud), on 2 of my personal sites, i use command line dropbox and have the backups placed in a folder in dropbox and can manage it that way.

http://bash.cyberciti.biz/backup/bac...base-server-2/
http://snippets.dzone.com/posts/show/4172
http://crunchbang.org/archives/2007/...-mysql-backup/ ---- this one can perform a remote backup.
http://paulbradley.tv/38/ --- email support via perl, looks very easy to setup.
I think they both would be effective if setup properly. I personally backup every 6 hours.


Last edited by cselzer; 03-15-2011 at 01:30 PM.
Reply With Quote
  #3  
Old 03-15-2011, 02:01 PM
CoderJosh CoderJosh is offline
Web Hosting Master
 
Join Date: May 2008
Location: Germany
Posts: 674
Check out http://sourceforge.net/projects/automysqlbackup/ for a shell script that can backup remote SQL servers and e-mail the files.

__________________
CoderJosh | Web Application Developer and Linux Server Admin
█ SysAdmin Services | WebApp Coding | Tuning | Hardening
█ Available for hire on a per-project or part-time basis | http://www.coderjosh.com/


Reply With Quote
Sponsored Links
  #4  
Old 03-15-2011, 05:37 PM
iTom iTom is offline
Web Hosting Master
 
Join Date: Apr 2007
Posts: 3,481
Quote:
Originally Posted by cselzer View Post
Would be more effective to use bash. I did a search on google and found a few for you that you can easily adapt that would email the contents... but email isn't really realistic imo, it would be best to mount a drive or upload remote (preferably a cloud), on 2 of my personal sites, i use command line dropbox and have the backups placed in a folder in dropbox and can manage it that way.

http://bash.cyberciti.biz/backup/bac...base-server-2/
http://snippets.dzone.com/posts/show/4172
http://crunchbang.org/archives/2007/...-mysql-backup/ ---- this one can perform a remote backup.
http://paulbradley.tv/38/ --- email support via perl, looks very easy to setup.
I think they both would be effective if setup properly. I personally backup every 6 hours.
Quote:
Originally Posted by CoderJosh View Post
Check out http://sourceforge.net/projects/automysqlbackup/ for a shell script that can backup remote SQL servers and e-mail the files.
By the looks of the first post he is wanting to do it on a Windows server, neither of these I think would work as their designed for Linux.

Are you familiar with any programming languages such as PHP?

Reply With Quote
  #5  
Old 03-15-2011, 06:05 PM
senaia senaia is offline
Junior Guru
 
Join Date: Feb 2004
Location: Dubai
Posts: 176
The MySQL database is located on windows 2003 server, I need to install a php script on a linux server to connect daily to windows server, backup/email the database.

Yes, I prefe something in php since im used to it.

Reply With Quote
  #6  
Old 03-16-2011, 07:46 AM
CoderJosh CoderJosh is offline
Web Hosting Master
 
Join Date: May 2008
Location: Germany
Posts: 674
Quote:
Originally Posted by iTom View Post
By the looks of the first post he is wanting to do it on a Windows server, neither of these I think would work as their designed for Linux.
The OP mentioned that the script should run on a Linux server and MySQL is running on a Windows server.

The script I've linked to can be used in this scenario, it's a rather simple shell script that should run on any Linux server without any problems. Whether the MySQL server is a Linux or a Windows machine shouldn't make a difference.

__________________
CoderJosh | Web Application Developer and Linux Server Admin
█ SysAdmin Services | WebApp Coding | Tuning | Hardening
█ Available for hire on a per-project or part-time basis | http://www.coderjosh.com/


Reply With Quote
Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need MySQL backup PHP script JuicyFruit Programming Discussion 8 04-01-2006 05:30 PM
Remote backup script for fbsd liquid Hosting Security and Technology 4 06-15-2005 08:11 AM
Remote website backup script mutho Hosting Security and Technology 2 02-23-2005 12:34 AM
[PHP NEEDED] Backup/restore/email script tickedon Other Offers & Requests 0 01-09-2004 07:41 PM
MySQL backup script in PHP Research Names Programming Discussion 3 02-08-2003 12:13 AM

Related posts from TheWhir.com
Title Type Date Posted
Xpress Hosting Offers Dropmysite Web, Email Backup Service to Spanish SMBs Web Hosting News 2013-03-01 16:20:40
Sterling Data Storage Launches Three Cloud Backup Services Web Hosting News 2013-01-14 13:39:31
Hosting.com's New Online Backup Solution Offers Remote and Local Options Web Hosting News 2012-03-13 16:34:57
Email Provider Reflexion Networks Integrates LabTech Monitoring Solution Web Hosting News 2011-12-29 19:59:51
Cloud Services Firm j2 Buys Data Backup Unit of Irish Web Host C Infinity Web Hosting News 2011-11-02 18:19:37


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

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

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?