|
| Bookmark this page to: |
![]() ![]() |
| Mehdi Hasan |
Apr 7 2007, 10:52 AM
Post
#1
|
|
Administrator ![]() ![]() ![]() ![]() ![]() Group: Admin Posts: 1,185 Joined: 16-August 03 From: Dhaka, Bangladesh Member No.: 1 |
Backup your whole website+database in zip format, get it via mail! Last updated: 10 April, 2007 ![]() ![]() Winner of 'Superior Code Award' for the month (April, 2007) by http://www.planet-source-code.com/! Who doesn't know how important it is to backup your site/blog often? Again, if you use dynamic sites such as Joomla or a forum (e.g. IPB), there is always a risk to be hacked, no matter how security concern you are! In my experience, it is not always easy to regularly maintain backups, especially, if you don't have a good internet connection. What if your site prepare backups for you and send it automatically to your inbox (Gmail, perhaps)? This script do the same: Without relying to basic PHP Mail, this script send mail via SMTP (authentication supported), which is much more powerful. In our test run, it could send 250 MB backup file in small 9 MB pieces each to a GMail account! Credits: This script is written by Mehdi Hasan (Me Swift SMTP mailer library is taken from http://www.swiftmailer.org/ Download from here: backup.zip (Installation instructions are included in the zip file.) -------------------- Mehdi Hasan Khan
Developer, Avro Keyboard - FREE Bangla Typing Software Administrator, OmicronLab Support Forum ![]() ------------------------------------ Please DON'T PM/mail me asking any kind of support. At first read the help files, then search the forum, in most cases it is already discussed. If you still cannot find a solution, open a thread in the appropriate section. This will help another user to solve the same issue. Thank you for your cooperation. |
| What Google Brings! |
Apr 7 2007, 10:52 AM
Post
#
|
![]() Thanks for your support! |
|
| Nipon |
Apr 7 2007, 12:05 PM
Post
#2
|
![]() Serious Contributor ![]() ![]() ![]() ![]() ![]() Group: Moderator Posts: 336 Joined: 27-December 05 From: Kolkata Member No.: 2,025 |
A few days ago u told me about another script. is this one better?
EDIT: Oh sorry i dint read the post completely. you made it! wow! Besides, the other script backed up only database but yours does to entire site. implementing it right now on my site! by the way, where do i keep the 'backup' folder? should it be in public_html or above it? -- ohh sorry its written in the instructions. This post has been edited by Nipon: Apr 7 2007, 12:30 PM -------------------- Nipon Haque
User Guides : Bangla Fonts : 3rd Party Tools : Blog : Search Before Posting : Forum Guidelines Bong Buzz ইংরেজি ভাষায় সেরা বঙ্গীয় ব্লগ |
| Mehdi Hasan |
Apr 7 2007, 12:20 PM
Post
#3
|
|
Administrator ![]() ![]() ![]() ![]() ![]() Group: Admin Posts: 1,185 Joined: 16-August 03 From: Dhaka, Bangladesh Member No.: 1 |
QUOTE oh sorry i dint read the post completely. you made it! wow! Ya! Although the code is not so complex, it was enough time consuming because there is not a single script like this available and I had to test it with different mailing systems and different coding styles. The final result I think is a good one. We are also using it on OmicronLab server PS> Don't forget to let me know when you get your first Backup! Another point, make sure you don't send too much backups to your Gmail inbox. When using with cron jobs, set it up carefully. It can easily take you to your site's bandwidth limit if you have a large site. -------------------- Mehdi Hasan Khan
Developer, Avro Keyboard - FREE Bangla Typing Software Administrator, OmicronLab Support Forum ![]() ------------------------------------ Please DON'T PM/mail me asking any kind of support. At first read the help files, then search the forum, in most cases it is already discussed. If you still cannot find a solution, open a thread in the appropriate section. This will help another user to solve the same issue. Thank you for your cooperation. |
| Mehdi Hasan |
Apr 7 2007, 05:10 PM
Post
#4
|
|
Administrator ![]() ![]() ![]() ![]() ![]() Group: Admin Posts: 1,185 Joined: 16-August 03 From: Dhaka, Bangladesh Member No.: 1 |
I've updated the backup script. Now it can send database backup also (optional)
-------------------- Mehdi Hasan Khan
Developer, Avro Keyboard - FREE Bangla Typing Software Administrator, OmicronLab Support Forum ![]() ------------------------------------ Please DON'T PM/mail me asking any kind of support. At first read the help files, then search the forum, in most cases it is already discussed. If you still cannot find a solution, open a thread in the appropriate section. This will help another user to solve the same issue. Thank you for your cooperation. |
| Mehdi Hasan |
Apr 8 2007, 04:27 PM
Post
#5
|
|
Administrator ![]() ![]() ![]() ![]() ![]() Group: Admin Posts: 1,185 Joined: 16-August 03 From: Dhaka, Bangladesh Member No.: 1 |
Here is a screenshot. The backup sender sent 11 splitted zip file for my site backup, and 1 complete zip file for database backup.
![]() -------------------- Mehdi Hasan Khan
Developer, Avro Keyboard - FREE Bangla Typing Software Administrator, OmicronLab Support Forum ![]() ------------------------------------ Please DON'T PM/mail me asking any kind of support. At first read the help files, then search the forum, in most cases it is already discussed. If you still cannot find a solution, open a thread in the appropriate section. This will help another user to solve the same issue. Thank you for your cooperation. |
| Mehdi Hasan |
Apr 10 2007, 01:19 PM
Post
#6
|
|
Administrator ![]() ![]() ![]() ![]() ![]() Group: Admin Posts: 1,185 Joined: 16-August 03 From: Dhaka, Bangladesh Member No.: 1 |
Now it works perfectly (updated just now). Also tested on Bangla Bhai's server
-------------------- Mehdi Hasan Khan
Developer, Avro Keyboard - FREE Bangla Typing Software Administrator, OmicronLab Support Forum ![]() ------------------------------------ Please DON'T PM/mail me asking any kind of support. At first read the help files, then search the forum, in most cases it is already discussed. If you still cannot find a solution, open a thread in the appropriate section. This will help another user to solve the same issue. Thank you for your cooperation. |
| Mehdi Hasan |
May 9 2007, 08:49 PM
Post
#7
|
|
Administrator ![]() ![]() ![]() ![]() ![]() Group: Admin Posts: 1,185 Joined: 16-August 03 From: Dhaka, Bangladesh Member No.: 1 |
![]() Great News! This script has won the Superior Coding Contest Award for the month of April, 2007 from PlanetSourceCode. Details can be known from here: ![]() -------------------- Mehdi Hasan Khan
Developer, Avro Keyboard - FREE Bangla Typing Software Administrator, OmicronLab Support Forum ![]() ------------------------------------ Please DON'T PM/mail me asking any kind of support. At first read the help files, then search the forum, in most cases it is already discussed. If you still cannot find a solution, open a thread in the appropriate section. This will help another user to solve the same issue. Thank you for your cooperation. |
| Nipon |
May 10 2007, 07:32 PM
Post
#8
|
![]() Serious Contributor ![]() ![]() ![]() ![]() ![]() Group: Moderator Posts: 336 Joined: 27-December 05 From: Kolkata Member No.: 2,025 |
Great!! Another feather in your cap.
-------------------- Nipon Haque
User Guides : Bangla Fonts : 3rd Party Tools : Blog : Search Before Posting : Forum Guidelines Bong Buzz ইংরেজি ভাষায় সেরা বঙ্গীয় ব্লগ |
| Mehdi Hasan |
May 11 2007, 01:34 AM
Post
#9
|
|
Administrator ![]() ![]() ![]() ![]() ![]() Group: Admin Posts: 1,185 Joined: 16-August 03 From: Dhaka, Bangladesh Member No.: 1 |
Thanks Nipon
-------------------- Mehdi Hasan Khan
Developer, Avro Keyboard - FREE Bangla Typing Software Administrator, OmicronLab Support Forum ![]() ------------------------------------ Please DON'T PM/mail me asking any kind of support. At first read the help files, then search the forum, in most cases it is already discussed. If you still cannot find a solution, open a thread in the appropriate section. This will help another user to solve the same issue. Thank you for your cooperation. |
| uunmatal tarunno |
May 11 2007, 01:21 PM
Post
#10
|
![]() Serious Contributor ![]() ![]() ![]() ![]() ![]() Group: Moderator Posts: 650 Joined: 18-March 06 From: ঢাহার শহর Member No.: 3,597 |
-------------------- জ্ঞান আমার শক্তি। -----------------------সবর আমার বর্ম। কৌশল আমার অস্ত্র। দক্ষতা আমার সঙ্গী। সাফল্য আমারই। -আত্ম-প্রত্যয়ন ![]() ----------------------- আমায় মেইল করতে চাইলে, ক্লিক করুন। আমার ব্লগ। দৃষ্টিভঙ্গি বদলান, জীবন বদলে যাবে। |
| eadiscus |
May 17 2007, 12:44 AM
Post
#11
|
|
New in OmicronLab Forum ![]() Group: Members Posts: 1 Joined: 17-May 07 Member No.: 11,262 |
Hi great script working well on my IPB forum,
Can you show me how to include this at beginning of script? rename .php .bak /home/username/public_html/forums/index.php rename down index /home/username/public_html/forums/down.php and once complete change it back (with this?) rename index down /home/username/public_html/forums/index.php rename .bak .php /home/username/public_html/forums/index.bak Obviously i have down.php in both locations and will replace the username part i was just going to copy and paste the commands in but would like it , if you can help? many thanks GAry. p.s can i recommend this script to others IPB users ? |
| J_Walker |
May 31 2007, 08:17 AM
Post
#12
|
|
New in OmicronLab Forum ![]() Group: Members Posts: 1 Joined: 31-May 07 Member No.: 11,346 |
Is there any way to include the ability to omit certain folders from being backed up? I have some folders that contain some pretty large files (100mb+) and do not really need to have them backed up.
Either that or perhaps allow an option to skip files larger than a certain size? |
| jonezrin |
Aug 9 2007, 08:46 AM
Post
#13
|
|
New in OmicronLab Forum ![]() Group: Members Posts: 3 Joined: 9-August 07 Member No.: 12,408 |
|
| Mehdi Hasan |
Aug 12 2007, 06:28 PM
Post
#14
|
|
Administrator ![]() ![]() ![]() ![]() ![]() Group: Admin Posts: 1,185 Joined: 16-August 03 From: Dhaka, Bangladesh Member No.: 1 |
Welcome to the Forum. glad that you like it
-------------------- Mehdi Hasan Khan
Developer, Avro Keyboard - FREE Bangla Typing Software Administrator, OmicronLab Support Forum ![]() ------------------------------------ Please DON'T PM/mail me asking any kind of support. At first read the help files, then search the forum, in most cases it is already discussed. If you still cannot find a solution, open a thread in the appropriate section. This will help another user to solve the same issue. Thank you for your cooperation. |
| oeconom |
Oct 11 2007, 02:23 AM
Post
#15
|
|
New in OmicronLab Forum ![]() Group: Members Posts: 3 Joined: 11-October 07 Member No.: 13,968 |
Hi,
this is a really really great script. Thanks for your efforts!!! I have one problem: The backup ist being created and saved in the tmp folder I defined, bit I don't get any email with the file... How do I correctly set the smtp settings up (taking an gmail account for the smtp credentials) to get it working? Or can there be something else I'm doing wrong? Thanks for your help, best wishes, oeconom |
| Mehdi Hasan |
Oct 11 2007, 03:34 AM
Post
#16
|
|
Administrator ![]() ![]() ![]() ![]() ![]() Group: Admin Posts: 1,185 Joined: 16-August 03 From: Dhaka, Bangladesh Member No.: 1 |
Hi, this is a really really great script. Thanks for your efforts!!! I have one problem: The backup ist being created and saved in the tmp folder I defined, bit I don't get any email with the file... How do I correctly set the smtp settings up (taking an gmail account for the smtp credentials) to get it working? Or can there be something else I'm doing wrong? Thanks for your help, best wishes, oeconom The problem may be with Gmail SMTP. I recommend to use your own site's SMTP for this purpose. For testing purposes I used Gmail SMTP with this script and Gmail told that my account has been locked at level 4 for abusing. -------------------- Mehdi Hasan Khan
Developer, Avro Keyboard - FREE Bangla Typing Software Administrator, OmicronLab Support Forum ![]() ------------------------------------ Please DON'T PM/mail me asking any kind of support. At first read the help files, then search the forum, in most cases it is already discussed. If you still cannot find a solution, open a thread in the appropriate section. This will help another user to solve the same issue. Thank you for your cooperation. |
| oeconom |
Oct 11 2007, 02:13 PM
Post
#17
|
|
New in OmicronLab Forum ![]() Group: Members Posts: 3 Joined: 11-October 07 Member No.: 13,968 |
Hi, this is a really really great script. Thanks for your efforts!!! I have one problem: The backup ist being created and saved in the tmp folder I defined, bit I don't get any email with the file... How do I correctly set the smtp settings up (taking an gmail account for the smtp credentials) to get it working? Or can there be something else I'm doing wrong? Thanks for your help, best wishes, oeconom The problem may be with Gmail SMTP. I recommend to use your own site's SMTP for this purpose. For testing purposes I used Gmail SMTP with this script and Gmail told that my account has been locked at level 4 for abusing. hmmm. ok, I also tried that but it doesn't work either. I don't know what the problem could be, but I don't get it working... |
| Mehdi Hasan |
Oct 11 2007, 03:13 PM
Post
#18
|
|
Administrator ![]() ![]() ![]() ![]() ![]() Group: Admin Posts: 1,185 Joined: 16-August 03 From: Dhaka, Bangladesh Member No.: 1 |
Even you setup everything well, there may be a number of reasons for not working, including how your host configure there servers, whether necessary files are available in Linux server, how large attachment is permitted by your SMTP server. Most of the time you will get some friendly error message. As this script is quite easy to understand try opening a support ticket of your host.
-------------------- Mehdi Hasan Khan
Developer, Avro Keyboard - FREE Bangla Typing Software Administrator, OmicronLab Support Forum ![]() ------------------------------------ Please DON'T PM/mail me asking any kind of support. At first read the help files, then search the forum, in most cases it is already discussed. If you still cannot find a solution, open a thread in the appropriate section. This will help another user to solve the same issue. Thank you for your cooperation. |
| oeconom |
Oct 12 2007, 12:50 AM
Post
#19
|
|
New in OmicronLab Forum ![]() Group: Members Posts: 3 Joined: 11-October 07 Member No.: 13,968 |
I thought it could have been because of the filsize that's send, but I now tried with some sample files that created a 82kb zip file and it didn't succeed either :-(
Does the mailer script to be set up seperately somehow? Thanks, oeconom |
| Mehdi Hasan |
Oct 12 2007, 08:07 AM
Post
#20
|
|
Administrator ![]() ![]() ![]() ![]() ![]() Group: Admin Posts: 1,185 Joined: 16-August 03 From: Dhaka, Bangladesh Member No.: 1 |
I thought it could have been because of the filsize that's send, but I now tried with some sample files that created a 82kb zip file and it didn't succeed either :-( Does the mailer script to be set up seperately somehow? Thanks, oeconom Can you send me your configured script files? I cannot promise that I can help, already told you- it depends on a lot of factors. Send me @ - mhasan [at] omicronlab [dot] com -------------------- Mehdi Hasan Khan
Developer, Avro Keyboard - FREE Bangla Typing Software Administrator, OmicronLab Support Forum ![]() ------------------------------------ Please DON'T PM/mail me asking any kind of support. At first read the help files, then search the forum, in most cases it is already discussed. If you still cannot find a solution, open a thread in the appropriate section. This will help another user to solve the same issue. Thank you for your cooperation. |
| jonezrin |
Apr 27 2008, 07:39 PM
Post
#21
|
|
New in OmicronLab Forum ![]() Group: Members Posts: 3 Joined: 9-August 07 Member No.: 12,408 |
I have been using this script regularly for about one half year and it works perfectly. However I just starting using a 28 megabyte database file and because it is larger than 10M, backup fails. Is there some way to exclude the database file?
Thank you. |
| jonezrin |
Apr 30 2008, 02:49 AM
Post
#22
|
|
New in OmicronLab Forum ![]() Group: Members Posts: 3 Joined: 9-August 07 Member No.: 12,408 |
All set. The solution was simply to move the large database file one directory above public_html. Thanks again for a great backup script.
|
| Life Coach UK |
Sep 5 2008, 01:21 AM
Post
#23
|
|
New in OmicronLab Forum ![]() Group: Members Posts: 2 Joined: 5-September 08 From: Belper, UK Member No.: 24,452 |
Ok, I'm also having trouble getting the emails to send. The program produces the backup zips (I might also add that these seem to automatically have the .zip extension even though I've not added this to the config area) and then it says sending emails... all emails have been sent.
The bit in the middle where it tells you that it's processing such and such a file do not appear at all. Any ideas? Thanks in advance! -------------------- |
| Life Coach UK |
Sep 5 2008, 04:09 AM
Post
#24
|
|
New in OmicronLab Forum ![]() Group: Members Posts: 2 Joined: 5-September 08 From: Belper, UK Member No.: 24,452 |
Further to my previous post, I've managed to get the script running - I had set the name of the backup file too long and it caused the script to think there were no files to email.
However, now it's working it's causing a fatal error as follows: Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 11268895 bytes) in /home/users/.../backup/lib/Swift/Cache/Memory.php on line 40 Any ideas? The size of my website is around 48MBs and that zips down to about 17MBs. Thanks. -------------------- |
| newmorning |
Sep 6 2008, 06:39 PM
Post
#25
|
|
New in OmicronLab Forum ![]() Group: Members Posts: 2 Joined: 6-September 08 Member No.: 24,529 |
I wish I were one more happy user of this script I've been looking for for days, but I still can't make any zip file, even for a test on the "lib" folder : the page says QUOTE(filesender) Zipping Directory: /lib Server failed to zip /lib! Hint: Make sure /tmp directory is CHOMD 777 and /lib path exists. Quiting... I am pretty sure that /tmp is chmod 777 and remains empty but unsure if I have to use a relative path or a real path : I tried both (with <?php echo realpath(''path.php'); ?> but could'nt make any zip at all. Is there a utility that could miss to make the zip file ? |
| newmorning |
Sep 7 2008, 05:31 AM
Post
#26
|
|
New in OmicronLab Forum ![]() Group: Members Posts: 2 Joined: 6-September 08 Member No.: 24,529 |
What can I do from there ? |
| steelerman99 |
Dec 13 2008, 09:36 AM
Post
#27
|
|
New in OmicronLab Forum ![]() Group: Members Posts: 1 Joined: 13-December 08 Member No.: 31,112 |
Hello!
First off, I would like to say that your script is fantastic! I'm using it to back up my site. Now, the reason for my message is to 1- report a bug and 2- share an addition I've made. 1) There is a logic error. You have a single '=' where you need a double '==' in the following line (which appears twice at approx lines 115 and 152): if ($mailserver_need_authentication="yes"){ 2) I was receiving an error message saying the server memory limit was exceeded, so I added a command ini_set('memory_limit', '116M'); to set the memory limit to whatever I please for the duration of the execution of the script. I also added a variable called $phpmem at the top where everything was being initialized so that the memory can be set more easily, so the above line looks like: ini_set('memory_limit', $phpmem); Just wanted to share my changes to this fantastic script! |
| elytsynos |
Jul 21 2009, 02:16 PM
Post
#28
|
|
New in OmicronLab Forum ![]() Group: Members Posts: 1 Joined: 21-July 09 Member No.: 42,691 |
I wish I were one more happy user of this script I've been looking for for days, but I still can't make any zip file, even for a test on the "lib" folder : the page says QUOTE(filesender) Zipping Directory: /lib Server failed to zip /lib! Hint: Make sure /tmp directory is CHOMD 777 and /lib path exists. Quiting... I am pretty sure that /tmp is chmod 777 and remains empty but unsure if I have to use a relative path or a real path : I tried both (with <?php echo realpath(''path.php'); ?> but could'nt make any zip at all. Is there a utility that could miss to make the zip file ? Yes, the script looks ok.. But, I have the same problem as newmorning. How to make this script works? Thank you |
| Nahiyan-BDH Lab |
Jul 11 2010, 10:52 AM
Post
#29
|
|
New in OmicronLab Forum ![]() Group: Members Posts: 5 Joined: 11-July 10 Member No.: 43,691 |
Maybe it's the problem with your web host if it's true then edit the script to disable zipping and generate uncompressed backup. Hope it will solve the problem. PM me if you wanna know how to disable zipping.
|
| revanth |
Jul 21 2010, 11:50 AM
Post
#30
|
|
New in OmicronLab Forum ![]() Group: Members Posts: 1 Joined: 21-July 10 Member No.: 43,719 |
thanks for the script ......... it worked for me alot
|
![]() ![]() |
Similar Topics
| Topic Title | Replies | Topic Starter | Views | Last Action |
|---|---|---|---|---|
| No entries to display | ||||
|
Lo-Fi Version | Time is now: 2nd September 2010 - 11:51 PM |
|
||||||||||||||
|
|
||||||||||||||