Use Gmail for MySQL backups
|
|
By Vlatko Zdrale in Web Developing - General Published: Monday, 29 January 07 - 04:22 PM (GMT) Last Updated: Monday, 29 January 07 - 04:49 PM (GMT) |
|
Yes you can use your Gmail account to backup your MySQL database. All you need is this backupDB() PHP script that backs up MySQL tables and databases to a gzip'd file for easy daily backup. Can back up a single database and/or table, or all tables. Structure-only, complete-inserts optional. Can be called interactively or run as a cron job.
Download this file:
- download backupDB.zip v1.2.3 [22.6 kB]
HTTP | ed2k
(first released Jan 17 2002 - updated Sep 13 2006)
If you think that email account is not secure enough, you can change one line of code and make backupDB.php send generated backup file to FTP server:
copy($backupabsolutepath.$fullbackupfilename, "ftp://user:pass@xxx.xxx.xxx:port/$fullbackupfilename");
This line of code works only if you have fopen ftp wrapper enabled (if it isn't you can use PHP FTP functions)
3 Comments so far: |
Leave a comment |
| bug in $TableStatusRow | horaciod | 01/30/07 |
| Hi I just wanna be a web developer but d (...) | Black Jack Turnier | 05/20/09 |
| ppo plans | ppo plans | 01/31/10 |
|
Top | Reply to this Title: bug in $TableStatusRow Author: horaciod (http://codigophp.com) Date Posted: 30 Jan 2007 05:28 PM (GMT) the line 105 from backupdb.php is checking for the index Type in mysql version 5.0.21 the "SHOW TABLE STATUS LIKE " hasn't any type column. fixed with f (isset ($TableStatusRow['Type'] ) and in_array($TableStatusRow['Type'], $NeverBackupDBtypes)) { |
|
Top | Reply to this Author: Black Jack Turnier (http://www.black-jack-regeln.de) Date Posted: 20 May 2009 02:07 PM (GMT) Hi I just wanna be a web developer but don't have any professional degree in the IT fied could I become the one. |
|
Top | Reply to this Title: ppo plans Author: ppo plans (http://www.ppocoverage.com) Date Posted: 31 Jan 2010 04:29 PM (GMT) i am new in this field. i always search new information about programming. it is really useful to me. |
Have your say on this article:
<-- Back