IPB

Welcome Guest ( Log In | Register )




 
Reply to this topicStart new topic
> Backup your whole website+database in zip format, get it via mail!
Mehdi Hasan
post Apr 7 2007, 10:52 AM
Post #1


Administrator
*****

Group: Admin
Posts: 1,177
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

IPB ImageIPB Image

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)? biggrin.gif

This script do the same:
icon11.gif Backup your whole website/blog by compressing it in zip format

icon11.gif Split the zip files to smaller size so that you can easily get them via mail. (Gmail doesn't allow attachments more than 10 MB, this splitting solves this problem)

icon11.gif Backup your selected database by compressing it in zip format (*NEW*)

icon11.gif Send backup files to you via mail!


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! biggrin.gif


Credits:
This script is written by Mehdi Hasan (Me biggrin.gif ). http://www.omicronlab.com/

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


IPB Image
------------------------------------
Latest RSS Topic (Click to Subscribe to OmicronLab RSS Feeds)
IPB Image
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
What Google Brings!
post Apr 7 2007, 10:52 AM
Post #


Thanks for your support!















Go to the top of the page
Quote Post
Nipon
post Apr 7 2007, 12:05 PM
Post #2


Serious Contributor
*****

Group: Moderator
Posts: 230
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! biggrin.gif

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 Niponwave

BONGBUZZ - BE THERE, LEAVE YOUR COMMENTS AND JOIN THE DISCUSSION
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Mehdi Hasan
post Apr 7 2007, 12:20 PM
Post #3


Administrator
*****

Group: Admin
Posts: 1,177
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 smile.gif

PS> Don't forget to let me know when you get your first Backup! biggrin.gif

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


IPB Image
------------------------------------
Latest RSS Topic (Click to Subscribe to OmicronLab RSS Feeds)
IPB Image
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Mehdi Hasan
post Apr 7 2007, 05:10 PM
Post #4


Administrator
*****

Group: Admin
Posts: 1,177
Joined: 16-August 03
From: Dhaka, Bangladesh
Member No.: 1



I've updated the backup script. Now it can send database backup also (optional) smile.gif


--------------------
Mehdi Hasan Khan

Developer, Avro Keyboard - FREE Bangla Typing Software
Administrator, OmicronLab Support Forum


IPB Image
------------------------------------
Latest RSS Topic (Click to Subscribe to OmicronLab RSS Feeds)
IPB Image
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Mehdi Hasan
post Apr 8 2007, 04:27 PM
Post #5


Administrator
*****

Group: Admin
Posts: 1,177
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.


IPB Image


--------------------
Mehdi Hasan Khan

Developer, Avro Keyboard - FREE Bangla Typing Software
Administrator, OmicronLab Support Forum


IPB Image
------------------------------------
Latest RSS Topic (Click to Subscribe to OmicronLab RSS Feeds)
IPB Image
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Mehdi Hasan
post Apr 10 2007, 01:19 PM
Post #6


Administrator
*****

Group: Admin
Posts: 1,177
Joined: 16-August 03
From: Dhaka, Bangladesh
Member No.: 1



Now it works perfectly (updated just now). Also tested on Bangla Bhai's server smile.gif


--------------------
Mehdi Hasan Khan

Developer, Avro Keyboard - FREE Bangla Typing Software
Administrator, OmicronLab Support Forum


IPB Image
------------------------------------
Latest RSS Topic (Click to Subscribe to OmicronLab RSS Feeds)
IPB Image
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Mehdi Hasan
post May 9 2007, 08:49 PM
Post #7


Administrator
*****

Group: Admin
Posts: 1,177
Joined: 16-August 03
From: Dhaka, Bangladesh
Member No.: 1



IPB ImageIPB Image


Great News!


This script has won the Superior Coding Contest Award for the month of April, 2007 from PlanetSourceCode. biggrin.gif

Details can be known from here:
icon11.gif Script Page



IPB Image


--------------------
Mehdi Hasan Khan

Developer, Avro Keyboard - FREE Bangla Typing Software
Administrator, OmicronLab Support Forum


IPB Image
------------------------------------
Latest RSS Topic (Click to Subscribe to OmicronLab RSS Feeds)
IPB Image
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Nipon
post May 10 2007, 07:32 PM
Post #8


Serious Contributor
*****

Group: Moderator
Posts: 230
Joined: 27-December 05
From: Kolkata
Member No.: 2,025



Great!! Another feather in your cap. clapping.gif


--------------------
Nipon Haque Niponwave

BONGBUZZ - BE THERE, LEAVE YOUR COMMENTS AND JOIN THE DISCUSSION
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Mehdi Hasan
post May 11 2007, 01:34 AM
Post #9


Administrator
*****

Group: Admin
Posts: 1,177
Joined: 16-August 03
From: Dhaka, Bangladesh
Member No.: 1



Thanks Nipon smile.gif


--------------------
Mehdi Hasan Khan

Developer, Avro Keyboard - FREE Bangla Typing Software
Administrator, OmicronLab Support Forum


IPB Image
------------------------------------
Latest RSS Topic (Click to Subscribe to OmicronLab RSS Feeds)
IPB Image
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
uunmatal tarunno
post May 11 2007, 01:21 PM
Post #10


Serious Contributor
*****

Group: Moderator
Posts: 599
Joined: 18-March 06
From: ঢাহার শহর
Member No.: 3,597



IPB Image IPB Image IPB Image IPB Image IPB Image IPB Image


--------------------
জ্ঞান আমার শক্তি।
সবর আমার বর্ম।
কৌশল আমার অস্ত্র।
দক্ষতা আমার সঙ্গী।
সাফল্য আমারই।

-আত্ম-প্রত্যয়ন
-----------------------
IPB Image
-----------------------

আমায় মেইল করতে চাইলে, ক্লিক করুন।
আমার ব্লগ।


দৃষ্টিভঙ্গি বদলান, জীবন বদলে যাবে।



User is offlineProfile CardPM
Go to the top of the page
+Quote Post
eadiscus
post 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 ?


User is offlineProfile CardPM
Go to the top of the page
+Quote Post
J_Walker
post 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?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
jonezrin
post Aug 9 2007, 08:46 AM
Post #13


New in OmicronLab Forum
*

Group: Members
Posts: 3
Joined: 9-August 07
Member No.: 12,408



QUOTE(Administrator @ Apr 7 2007, 07:10 AM) *
I've updated the backup script. Now it can send database backup also (optional).
I joined the forum simply to say what a fantastic backup script this is. I looked at many and yours is by far the best. Thank you very much.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Mehdi Hasan
post Aug 12 2007, 06:28 PM
Post #14


Administrator
*****

Group: Admin
Posts: 1,177
Joined: 16-August 03
From: Dhaka, Bangladesh
Member No.: 1



Welcome to the Forum. glad that you like it smile.gif


--------------------
Mehdi Hasan Khan

Developer, Avro Keyboard - FREE Bangla Typing Software
Administrator, OmicronLab Support Forum


IPB Image
------------------------------------
Latest RSS Topic (Click to Subscribe to OmicronLab RSS Feeds)
IPB Image
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
oeconom
post Oct 11 2007, 02:23 AM
Post #15