View Full Version : ee backup 1.05 question
seanspeng
20th of July 2003 (Sun), 13:59
Pekka,
The EEBACKUP 1.5 is a great script that you've written. And i have used it on an emergency situation, and it worked like a dream, a 15MB database only took several seconds to restore!
However, there are some issues that I am not totally clear on.
I know that EEbackup gives you two options on restore. One is to restore from target database, and this is so fast like I described above. I see the script insert a backup table into the database, so it restores from right there.
But what if your whole database has been hacked and wipped out. And you have to restore by uploading a backup copy saved from EEbackup that is stored on your local computer hard drive? I tried this, but it always times out and freezes. Also on the eebackup screen, it says my php upload limit is 2MB. What should I do to make the restore from a file upload working around the size & time limitation that is set by the server?
And in summary, if I cannot use restore from target database, what is the best way to do it with EEbackup? Do I need to change/configure anything at anywhere?
Are you planning to add a scheduler to the script so it can specify a time to backup each day like some FTP has?
Thank you for your great script and your kind help!
Pekka
20th of July 2003 (Sun), 18:33
Hi Sean,
Thanks for your compliments!
I know that EEbackup gives you two options on restore. One is to restore from target database, and this is so fast like I described above. I see the script insert a backup table into the database, so it restores from right there.
I initially coded EE backup in two weeks nonstop coding and testing session because I desperately needed
a) backup system for EE
b) a quick backup/restore system for MySQL developing, a system which in in db, but can handle situation when application totally messes up its own tables.
b is why I made "database backup sets" - they are extremely fast to restore and there is absolutely no need of command parsing which always slows restore down and causing all kinds of bugs which may halt restore alltogether.
But what if your whole database has been hacked and wipped out. And you have to restore by uploading a backup copy saved from EEbackup that is stored on your local computer hard drive? I tried this, but it always times out and freezes. Also on the eebackup screen, it says my php upload limit is 2MB. What should I do to make the restore from a file upload working around the size & time limitation that is set by the server?
The file backup system is for downloading backups and keeping them safe at home. File backups are your only hope when server crashes physically, or MySQL is wiped out.
If you have filesize limitations on your PHP, then use ftp to upload and download.
The parser system for file backups is not the most clever one there is, but it works well with complex delimiters as is there by default. If the parser halts with default delimiter there are possible reasons:
- there is some binary data corruption in backup (downloaded/uploaded in BINARY using ftp).
- there are wrong commands for MySQL (restore from newer server to older)
- parser fails to separate commands properly at some point
- php max execution time was exceeded. In this case add
php_value max_execution_time 3600
(where 3600 means seconds i.e one hour) to htaccess file. Should do the trick.
If restore halts, or you need to make sure there is no binary data in backup a good way to find where the pitfall spot is is to use EE Backup's "view dump" command. When it reads the file and displays in on browser (you can see [EOF] in the end) then there should be no problems with file type.
If you continue have problems with big files, the you can split the file backup file to smaller sections (from delimiter) and run those sections separately.
You can watch restore progress by using PhpMyAdmin or similar utility and refresh it e.g. every 10 seconds. You can see how many megabytes and rows were restored and it there is a problem you can use this info to seek that spot in dump.
But the file restore mostly works ok, as this forum was restored a while ago from about 40MB file backup with EE Backup. :)
Note that EE Backup makes it possible to restore from another MySQL server, too. This means you can make and restore database backup sets over network. Setting this up can be tedious because you need to pass firewalls and make sure that only those machines can communicate directly (IP security is VERY important), but it works - I tested it when I did EE Backup - I made backups from US to Finland :)
And in summary, if I cannot use restore from target database, what is the best way to do it with EEbackup? Do I need to change/configure anything at anywhere?
No need to change anything. Just remember to take and download file backups from time to time.
Are you planning to add a scheduler to the script so it can specify a time to backup each day like some FTP has?
automatic scheduled backups are usually done by inserting a command script in cron folder in Linux. The script can then call EE backup and pass it parameters to do the backup and even move it to another server using ftp if needed.
As php apps do not run in server while you are away it is not possible to make it wake up in conventional manner. But there a ways to tie the backups to e.g. photo view count, and e.g. do a hidden backup every 5000 photo views. For this I have planned a version of EE backup that does not have any html output at all, and which logs results and errors to a file on server.
But now my main attraction is EE 1.5, and to get that full version beta finally out needs my full attention. So EE Backup needs to wait a little.
PS. I made a button in EE 1.5 editor: "Backup now" which launches EE backup and does file backup. Simple thing, but very useful.
seanspeng
20th of July 2003 (Sun), 20:52
If you have filesize limitations on your PHP, then use ftp to upload and download.
Pekka, you mean to ftp the backup file to the ee_backup_files folder, then open the EEBACKUP to Restore from File?
php_value max_execution_time 3600
(where 3600 means seconds i.e one hour) to htaccess file. Should do the trick.
The 1.05 version has that htaccess file and I uploaded it, just haven't got a chance to test it. That'll be great if this can get around the max upload size set by the php.
But the file restore mostly works ok, as this forum was restored a while ago from about 40MB file backup with EE Backup.
I wonder how long it took you to restore 40MB database with Restore From File?
I also noticed there is an warning message on my EEBACKUP page on the center column on the bottom:
Notice: Undefined variable: report_location in /home/... .../backup/index.php on line 2661
(below).
What does that mean? Anything wrong with my setting or code?
Pekka, there are too many great things in your EE baby, the backup is certainly one of the best written utility and I haven't found in the market anyone that is as easy to use as yours. You certainly should put it up in places like hotscripts and price it accordingly.
Thanks a lot for the great product!
Pekka
21st of July 2003 (Mon), 05:34
seanspeng wrote:
If you have filesize limitations on your PHP, then use ftp to upload and download.
Pekka, you mean to ftp the backup file to the ee_backup_files folder, then open the EEBACKUP to Restore from File?
Yes.
But the file restore mostly works ok, as this forum was restored a while ago from about 40MB file backup with EE Backup.
I wonder how long it took you to restore 40MB database with Restore From File?
I recall it took something like 20 minutes. As I said a good way to follow progress is use some other program to check the database. Now that I think of it I have a nice iFrame reporting system in EE now to follow ftp progress, that would be easy to add to EE Backup too.
I also noticed there is an warning message on my EEBACKUP page on the center column on the bottom:
Notice: Undefined variable: report_location in /home/... .../backup/index.php on line 2661
(below).
What does that mean? Anything wrong with my setting or code?
Oh it's just a missing variable, nothing to worry about. It appeared when I took away possibility to select report output location. I'll post a 1.06 tomorrow where it is fixed.
Pekka, there are too many great things in your EE baby, the backup is certainly one of the best written utility and I haven't found in the market anyone that is as easy to use as yours. You certainly should put it up in places like hotscripts and price it accordingly.
Yes, marketing and advertising is one thing I really can't do - but hopefully programs will be their best ads. I will make sure that all list archives have EE Backup and EE by the end of the week.
vBulletin® v3.6.12, Copyright ©2000-2012, Jelsoft Enterprises Ltd.