This is a pure php implementation of a php backup script. So it should work fine on windows and linux. But its not suited for takeing very large backups.
I just wrote it cause most of the script i saw offered file or database backup and broke down to usage of exec and unix commands , for which i had to contact hosting.
Some basic features -
- File and Directory backup
- Multiple database/table sql backup
- Backup email
The script is supposed to be called using automatically using CRON , and the backup folder in which backup it taken should be writable.All you have to do is run backup.php .
Edit config.php before use. Released under GNU GPL license.


Can this script be modified to push the backup to a remote ftp location automatically? Can it also be modded to incorporate an automatic schedule in it? getting its instructions from an sqlite database?
Automatic schedule would be set using cron and yes it can push using FTP , you will require php ftp library for that.
requires some additional coding after the email part.
I can’t seem to get multiple databases to work. I’ve tried comma separation, comma with a space, no comma with a space. How do I set up the config to backup numerous databases?
What I have tried:
‘database’=>’db1,db2′,
‘database’=>’db1, db2′,
‘database’=>’db1 db2′,
@Dave
It should go something like this for multiple database
$configBackupDB[] = array(’server’=>’localhost’,'username’=>’root’,'password’=>”,’database’=>’database1′,’tables’=>array());
$configBackupDB[] = array(’server’=>’localhost’,'username’=>’root’,'password’=>”,’database’=>’database2′,’tables’=>array());
$configBackupDB[] = array(’server’=>’localhost’,'username’=>’root’,'password’=>”,’database’=>’database3′,’tables’=>array());
hey thanks for your great script and its will save alot of my time
I think there is something up with the zip process, it creates the zip files fine, but they cannot be opened or inflated. I get Error 1 - Operation not permitted
HAve tested zips myself they seem to work just fine.
I was trying to develop my own, but found yours.
Thanks a lot admin, its a very handy script for me!
who is the admin of site……
contect me……..
hello im having problem with this script.. im getting 2 SQL in my zip file each time i call the backup.php ? what im doing wrong?
thank alot
it seems very god
3ks for Ur script
Hi.
I put this script on my website, and after I configure it, i’m getting my db in a zip file (that’s OK), but on my email I receive “mail send … ERROR!” Do you know what could be the problem?
And one more thing: after i will resolve this issue with email sending, can you show me how to modify the script to erase from my website the zip database that was send it by email?
Thank you
Do we need to create permission to this files?
Precision Automation Robotics India Limited.
Specialize in Automation, Robotics, Welding, Gantry Robots, Robot, Machine Tending,Thermal Cutting, Forgig & Hot forming, Deburring & Polishing, Crane and Hoist Products, Stamping & Cold Forming, Standard Articulated Robot,
Portal Robots, Robot Transporters, Robotic Enclosures, Auxiliary Axis Modules (Linear & Rotary) Gauging & Measurement, Forging & Hot forming, Non Destructive Testing, Global Automation Solution provider using world class Robotic products & technologies. Leader in Automated Car Parking Solutions.
PARI- Automated Car parking System. An Ideal solution for today’s city parking and traffic problems PARI auto parking system offers utmost
Efficiency, Convenience, Safety & Reliability. Parking, Automated, Auto car parking, Machine Parking, staker parking, Two step, puzzle, tower, multiple, auto parking, car parking solution,
parking solutions, Systems, PARI, PUNE, Parking, Automation, Automatic, Solution,Robotics
Hi,
I need to keep database file in separate directory (like ‘database’ directory)instead of root directory. Can you suggest some changes existing script.
Hello, and thanks for the script.
I keep getting “Fatal error: Out of memory (allocated…” errors when running, as cron or not. I have upped the “memory_limit = 120M” limit in the php.ini, but can’t stop this error.
Any help!!!
Thanks,
This happens when , the size of database becomes quite big and pure php is not able to handle the database in a string.
Maybe next version would resolve this issue.
I keep getting the following error:
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in /home/content/g/l/o/globalwaves/html/domains/Dustinturin/scripts/backup/functions.php on line 11
Unpacked the script directly from the download, without changing anything in the functions folder… any ideas?
Not that I’m totally impressed, but this is more than I expected for when I found a link on Digg telling that the info here is awesome. Thanks.
EXCELLENT SCRIPT
Just an improvement for huge backups with memory limitations.
Line 110 functions.php
$newOffset = strlen(implode(”", $this->compressedData));
replace with:
$currentOffset = strlen( $feedArrayRow );
$newOffset = $this->oldOffset + $currentOffset;
Thanks for the script
The same at line 45.
Awesome!!! Exactly what I was looking for & it works flawlessly!! Thank you!!!
Hey thanks..
But some of my website have many pics.. It should be so big backup files..
How to make the compressed backup files got splitted in smaller size? Is that possible?
Thanks in advance
The files backup is ok but my database is empty!
It’s ok now!!!!
very helpful and nice application.
thnx to author.