Page Index Toggle Pages: [1] 2 3 ... 10 Send TopicPrint
Very Hot Topic (More than 25 Replies) YaBB 2 Backup Beta 3.1 for YaBB 2.0/2.1 (Read 78481 times)
AK108
God Member
*****
Offline



Posts: 942
Joined: Oct 1st, 2003
Gender: Male
YaBB 2 Backup Beta 3.1 for YaBB 2.0/2.1
Dec 14th, 2005 at 1:59pm
Print Post  
Latest version: Beta 3.1

Translations (Version)
German: Beta 3.1
Dutch: Beta 3
Russian: Beta 2

Here's a mod that should be useful to everyone. It allows you to select what YaBB directories to backup and then allows you to run backups in the Admin Center.

If you've seen any of my other mods, you'll notice that this started at Beta 1 rather then 1.0. While my other mods are fairly simple by comparision, this depends on the system configuration and platform differences. I also haven't tested this as much as I could. Please help by reporting good and bad experiences along with your server's OS and what method used.

Features:
- Select just what you want backed up
- Support for .tar, .tar.gz, .tar.bz2, and .zip formats
- All methods implemented as Perl modules and as system() calls. This means that there should be a method working for everyone.
- Autodetected methods. Only the ones supported will be shown.

To install:
Use BoardMod like normal
Upload Languages/English/YaBB2Backup.lng (in zip)
Upload AdminIndex.pl, Admin/AdminSublist.pl, Admin/ModList.pl (changed files)
Upload Admin/YaBB2Backup.pl (in zip)
Upload Modules/Archive/Tar.pm (in zip) if you want it
Upload Modules/MIME/Lite.pm (in zip) if you want it
Make a Backups directory (default is ./Backups) and chmod it 777 or 755. I strongly advise using a .htaccess file with this. (.htaccess is included as of Beta 3)

Modules supported / directly used:
Archive::Tar (pure Perl implementation and included in zip)
Compress::Bzip2
Compress::Zlib
Archive::Zip
MIME::Lite (appears to be pure Perl so it's included in the zip), optional

Binary methods supported:
As of Beta 2, $ENV{'PATH'} is searched for the following binary methods:
tar, gzip, bzip2, zip

I also plan to add support for a native Win32 binary method (likely pkzip) as the modules are generally slow.

Version History:
Beta 3.1 (YaBB 2.0/2.1): Bugfixes for Beta 3, and German, Dutch, and partial Russian language files included.
Beta 3 (YaBB 2.0/2.1): Added "Manage Backups" area to download, delete, or email. Fixed problem with autodetecting paths to binary versions of tar, bzip2, gzip, zip. Added MIME::Lite to mod package, as well as the Backups/ directory. (February 11th, 2006)
Beta 2 (YaBB 2.0/2.1): Fixed bug with getting to the backup area. Added support for tar, bzip2, gzip, and zip anywhere in PATH. Added Archive::Tar to the mod package. Added timing of your backup. (December 17th, 2005)
Beta 1 (YaBB 2.0/2.1): Mod package made available on BoardMod. (December 13th, 2005)
« Last Edit: Feb 25th, 2006 at 10:32pm by AK108 »  

yabb2backup_beta3.1.zip ( 58 KB | Downloads )

For my mods, check out my public notes.

You might be interested in my projects, or my forum, the Flying Kirby Pub.
Back to top
WWWAIM  
IP Logged
 
Mongo
Full Member
***
Offline


Mongo only pawn in game
of life.

Posts: 197
Location: Hampstead
Joined: Jun 23rd, 2005
Gender: Male
Re: YaBB 2 Backup Beta 1 for YaBB 2.0/2.1
Reply #1 - Dec 14th, 2005 at 2:56pm
Print Post  
And if anyone needs to figure out what modules your server has loaded, here's a neat script that'll give you all the info you ever wanted...and then some.  This script came from EZscripting.co.uk and I've used it quite often for various reasons.

Place the script on your server - no specific directory needed, but it must be somewhere you can access it in a URL, then just browse to it.  Don't forget to CHMOD it to 755 if your on a *NIX server.  Those of you on Windows systems need not have to worry.
« Last Edit: Dec 14th, 2005 at 6:31pm by Mongo »  

advanced-test.zip ( 4 KB | Downloads )

--I no longer have time to work on my mods.  If anyone wants to continue what I've started, be my guest.  Please read my notes in my profile for more information.

--Mongo
Back to top
 
IP Logged
 
Bigguy
Junior Member
**
Offline



Posts: 52
Joined: Oct 26th, 2005
Gender: Male
Re: YaBB 2 Backup Beta 1 for YaBB 2.0/2.1
Reply #2 - Dec 14th, 2005 at 5:05pm
Print Post  
Well I will be adding these to my test mods for today.

Thanks.  Smiley
  
Back to top
 
IP Logged
 
Curtiss Grymala
God Member
*****
Offline


YaBB?... Y Not?

Posts: 1314
Joined: Apr 12th, 2004
Gender: Male
Re: YaBB 2 Backup Beta 1 for YaBB 2.0/2.1
Reply #3 - Dec 14th, 2005 at 8:03pm
Print Post  
Does this mod create an archive on your server, or does it try to download the file to your local machine?

How does it generate filenames for the archives?  It would be cool if it created the file on the server, and either generated two separate, alternating archives, or generated archives with the date in the filename, so you never accidentally archived over a good archive with a bad archive.
  

Currently using Y2.3 With no mods (though that will hopefully change, soon).

Click Here To See A List Of All The Mods I've Written
Back to top
WWW  
IP Logged
 
TheSkier
Junior Member
**
Offline



Posts: 94
Location: Sakhalin
Joined: Jul 9th, 2004
Gender: Male
Re: YaBB 2 Backup Beta 1 for YaBB 2.0/2.1
Reply #4 - Dec 15th, 2005 at 12:09am
Print Post  
how about incremental backups implementation?
that would be nice to have an opportunity to backup only those files, which were changed since last full backup (especially useful when dumping contents of such a huge folders like  messages and uploads!)
  
Back to top
WWW  
IP Logged
 
Xavier
Senior Member
****
Offline



Posts: 442
Location: Ipswich
Joined: Apr 5th, 2005
Gender: Male
Re: YaBB 2 Backup Beta 1 for YaBB 2.0/2.1
Reply #5 - Dec 15th, 2005 at 12:11am
Print Post  
Quote:
Does this mod create an archive on your server, or does it try to download the file to your local machine?

It places a backup in the folder you specify (Must be created first CHMOD 0755)

Quote:
How does it generate filenames for the archives?  It would be cool if it created the file on the server, and either generated two separate, alternating archives, or generated archives with the date in the filename, so you never accidentally archived over a good archive with a bad archive.

The Backup name consists of backup.random#.extension
  
Back to top
WWWYIM  
IP Logged
 
AK108
God Member
*****
Offline



Posts: 942
Joined: Oct 1st, 2003
Gender: Male
Re: YaBB 2 Backup Beta 1 for YaBB 2.0/2.1
Reply #6 - Dec 15th, 2005 at 12:40am
Print Post  
Bigguy wrote on Dec 14th, 2005 at 5:05pm:
Well I will be adding these to my test mods for today.

Thanks.  Smiley


Cool, hope it goes well.

TheSkier wrote on Dec 15th, 2005 at 12:09am:
how about incremental backups implementation?
that would be nice to have an opportunity to backup only those files, which were changed since last full backup (especially useful when dumping contents of such a huge folders like  messages and uploads!)


Incremental could be done. I could copy it and make the incremental on top of the new one, which is probably how I'd do it. It'd be an option, of course.

As for Attachments, it seems odd that it's caught under the yabbfiles one path... I may make a separate entry for it later.

Quote:
It places a backup in the folder you specify (Must be created first CHMOD 0755)

The Backup name consists of backup.random#.extension


You're right, except the random number is actually the value of the "time" function in Perl. So you can sort by filename and the largest number is the most recent and the smallest is the oldest. (You can also use a program to figure out what the time really is).
  

For my mods, check out my public notes.

You might be interested in my projects, or my forum, the Flying Kirby Pub.
Back to top
WWWAIM  
IP Logged
 
Curtiss Grymala
God Member
*****
Offline


YaBB?... Y Not?

Posts: 1314
Joined: Apr 12th, 2004
Gender: Male
Re: YaBB 2 Backup Beta 1 for YaBB 2.0/2.1
Reply #7 - Dec 15th, 2005 at 1:28am
Print Post  
AK108 wrote on Dec 15th, 2005 at 12:40am:
You're right, except the random number is actually the value of the "time" function in Perl. So you can sort by filename and the largest number is the most recent and the smallest is the oldest. (You can also use a program to figure out what the time really is).


Very cool.  This mod sounds like its exactly what I've been looking at (especially if you implement incremental back-ups).  Very nice work, AK.  Thank you very much.
  

Currently using Y2.3 With no mods (though that will hopefully change, soon).

Click Here To See A List Of All The Mods I've Written
Back to top
WWW  
IP Logged
 
Xavier
Senior Member
****
Offline



Posts: 442
Location: Ipswich
Joined: Apr 5th, 2005
Gender: Male
Re: YaBB 2 Backup Beta 1 for YaBB 2.0/2.1
Reply #8 - Dec 15th, 2005 at 1:31am
Print Post  
Here is a perl time converter just enter the file name is the box to convert
http://perlprogrammers.com/scripts/unix_time/ut.cgi

LINK NO LONGER WORKS
« Last Edit: Feb 16th, 2006 at 5:28am by Xavier »  
Back to top
WWWYIM  
IP Logged
 
Curtiss Grymala
God Member
*****
Offline


YaBB?... Y Not?

Posts: 1314
Joined: Apr 12th, 2004
Gender: Male
Re: YaBB 2 Backup Beta 1 for YaBB 2.0/2.1
Reply #9 - Dec 15th, 2005 at 1:43am
Print Post  
Quote:
Here is a perl time converter just enter the file name is the box to convert
http://perlprogrammers.com/scripts/unix_time/ut.cgi


That's cool.  I made a PHP version of that for myself a few weeks ago, because I couldn't find anything like that.  Thanks for the link X.
  

Currently using Y2.3 With no mods (though that will hopefully change, soon).

Click Here To See A List Of All The Mods I've Written
Back to top
WWW  
IP Logged
 
TheSkier
Junior Member
**
Offline



Posts: 94
Location: Sakhalin
Joined: Jul 9th, 2004
Gender: Male
Re: YaBB 2 Backup Beta 1 for YaBB 2.0/2.1
Reply #10 - Dec 15th, 2005 at 2:09am
Print Post  
bug found. in yabb2backup.mod file, last step has wrong name for AdminIndex.pl action call
it will look for:
/cgi-bin/yabb2/AdminIndex.pl?action=YaBB2Backup
instead of:
./cgi-bin/yabb2/AdminIndex.pl?action=backupsettings

i.e. it will kick you off to main Admin screen because "YaBB2Backup" action doesn't exist!

here is the correction:

find:
Code
Select All
	$yabb2backup = 'YaBB2Backup|YaBB 2 Backup|Backup your forum|';
	push (@boardmod_mods, $yabb2backup); 



replace with:
Code
Select All
	$yabb2backup = 'backupsettings|YaBB 2 Backup|Backup your forum|';
	push (@boardmod_mods, $yabb2backup); 



anyway, my local test server completely hung on backup attemp! Wink
  
Back to top
WWW  
IP Logged
 
AK108
God Member
*****
Offline



Posts: 942
Joined: Oct 1st, 2003
Gender: Male
Re: YaBB 2 Backup Beta 1 for YaBB 2.0/2.1
Reply #11 - Dec 15th, 2005 at 2:14am
Print Post  
I'll fix that as soon as I can.

What method were you using? If any other options were offered, did any others work?
  

For my mods, check out my public notes.

You might be interested in my projects, or my forum, the Flying Kirby Pub.
Back to top
WWWAIM  
IP Logged
 
TheSkier
Junior Member
**
Offline



Posts: 94
Location: Sakhalin
Joined: Jul 9th, 2004
Gender: Male
Re: YaBB 2 Backup Beta 1 for YaBB 2.0/2.1
Reply #12 - Dec 15th, 2005 at 5:06am
Print Post  
AK108 wrote on Dec 15th, 2005 at 2:14am:
I'll fix that as soon as I can.

What method were you using? If any other options were offered, did any others work?

Archive::Tar (its in windows)
will check /bin/tar on real server Smiley
  
Back to top
WWW  
IP Logged
 
AK108
God Member
*****
Offline



Posts: 942
Joined: Oct 1st, 2003
Gender: Male
Re: YaBB 2 Backup Beta 1 for YaBB 2.0/2.1
Reply #13 - Dec 15th, 2005 at 2:01pm
Print Post  
Was this a large forum? If so, you might not be able to use Archive::Tar due to its inefficiency.
  

For my mods, check out my public notes.

You might be interested in my projects, or my forum, the Flying Kirby Pub.
Back to top
WWWAIM  
IP Logged
 
mick
Senior Member
****
Offline


I love YaBB

Posts: 345
Location: Dorsten
Joined: Nov 29th, 2005
Gender: Male
Re: YaBB 2 Backup Beta 1 for YaBB 2.0/2.1
Reply #14 - Dec 15th, 2005 at 9:58pm
Print Post  
Quote:
And if anyone needs to figure out what modules your server has loaded, here's a neat script that'll give you all the info you ever wanted...and then some.  This script came from EZscripting.co.uk and I've used it quite often for various reasons.


Hi,
I try to run this script. But I don't know, how
or where to place the url
Code
Select All
##########################################################################

#  Enter URL to this script
my $script_url = "http://$ENV{'HTTP_HOST'}$ENV{'SCRIPT_NAME'}";

############################################################## 

  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: [1] 2 3 ... 10
Send TopicPrint