Advertisement:

Author Topic: Java SMF automated database backup  (Read 152673 times)

Offline viulian

  • Jr. Member
  • **
  • Posts: 235
    • Hex.ro
Java SMF automated database backup
« on: September 24, 2006, 05:00:55 PM »
Hi Guys!

I have made an application which automatically downloads the SMF database at regular intervals (minimum 1 hour, maximum 72 hours).

For anyone's interested:
- Java based - runs on each platform where Java runs, and has a nice GUI for configuring the forums and downloads. It requires JDK 1.5 (Generics included).
- Supports multiple forums, for SMF lovers :)
- On Windows it can minimize itself to system tray, and will continue to run.
- I have tested it on Windows XP using Sun's JDK 1.5.0_07 and on a RedHat Linux 7.3 using the same version JDK but for Linux. I see no problem why it won't work on Mac too.
- SMF 1.0.8 and 1.1 RC3 were tested.
- HTTP Proxy support (no Socks yet).

Application should be considered beta so far.. I have tested only on my forums and it's a pretty straight forward configuration, for example I have not changed the default settings. But I can't figure out all the possible configurations out there in the wild, so please let me know if you have issues with the application. (There's also a Debug mode build it, it will generate a rather big file but I'll investigate it and provide a fix if i'll be able to understand what goes wrong).

For the latest update follow this link: http://hex.ro/wp/projects/java-smf-backup/

Screen Shots (using Liquid Look and Feel):

Main Window:


Forum Management Dialog:


PS: later edit -> updated Application URL, thanks SiNaN.

PS: later edit -> after discussions with ups, it may be that Java SMF Backup will not work on large forums with low PHP memory limits. PHP process creating the backup might run out of memory. It is not a limit of Java SMF Backup. For example, 128Mb memory limit for PHP process is low for a forum that has the raw SQL (mysql-dump of the database) of ~100Mb; I keep the memory limit to 256Mb and is OK without zip compression (but still fails if I enable _zip_ compression). In case you have low php memory limit which you can't modify, you might need to consider different backup solution. (March 22, 2011)

PS: I've disabled downloads for all versions which are older than 1.3.5 ... You will now be redirected on the project page where you can download version 1.4.0 (supporting latest SMF releases).(Oct 8, 2011)
« Last Edit: October 08, 2011, 05:39:31 AM by viulian »

Offline JayBachatero

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,562
  • Gender: Male
    • @jaycreations on Twitter
    • JayBachatero.com
Re: Java SMF automated database backup
« Reply #1 on: October 23, 2006, 01:11:20 PM »
viulian great job on this tool.  Will be very useful for many people.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Offline usermike3969

  • Newbie
  • *
  • Posts: 9
  • Gender: Male
    • mib4life
Re: Java SMF automated database backup
« Reply #2 on: October 24, 2006, 02:19:43 AM »
Works very good  :) :D

i was looking for something like this thank you very much  :)



Offline viulian

  • Jr. Member
  • **
  • Posts: 235
    • Hex.ro
Re: Java SMF automated database backup
« Reply #3 on: October 26, 2006, 02:48:51 PM »
Thank you :)

I saw that the software is being downloaded but no one said a thing about it :D so I did not know what to believe.
« Last Edit: October 26, 2006, 02:50:30 PM by viulian »

xduugu

  • Guest
Re: Java SMF automated database backup
« Reply #4 on: October 26, 2006, 04:14:27 PM »
I don't see any possibility to download the source code :-\

Offline viulian

  • Jr. Member
  • **
  • Posts: 235
    • Hex.ro
Re: Java SMF automated database backup
« Reply #5 on: October 26, 2006, 04:18:55 PM »
I will upload the sourcecode to google code shortly - but didn't have enough time to set up an account there and fiddle a bit with the system.

xduugu

  • Guest
Re: Java SMF automated database backup
« Reply #6 on: October 26, 2006, 05:15:14 PM »
ah ok. thanks.

Offline viulian

  • Jr. Member
  • **
  • Posts: 235
    • Hex.ro
Re: Java SMF automated database backup
« Reply #7 on: October 28, 2006, 02:59:07 AM »
For anyone interested, the source code is now available via SVN from:

http://javasmfbackup.googlecode.com/svn/releases/v1.00/src/

Offline viulian

  • Jr. Member
  • **
  • Posts: 235
    • Hex.ro
Re: Java SMF automated database backup
« Reply #8 on: December 21, 2006, 02:16:27 AM »
Well, after 150 downloads - I see no feedback yet :)

Is anyone using this tool ?

Offline KGIII

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 6,293
  • Gender: Male
  • If you can build it, I can wreck it.
    • Web Hosting
Re: Java SMF automated database backup
« Reply #9 on: December 21, 2006, 02:22:43 AM »
viulian:

If you're interested I can send you a PM and perhaps set an account up for you where you can host it without relying on using Google? If you're happy with them (I understand they're more user-friendly than sourceforge.net) then just go ahead and ignore this.
My PC Support Forum
Please ask in-thread before PMing
                   SMF Help
                   Visit My Blog

How can we improve the support process?:
http://www.simplemachines.org/community/index.php?topic=163533.0

SMF vs. Godzilla? Who do you think will win?

Offline Ken.

  • Full Member
  • ***
  • Posts: 496
  • Gender: Male
  • TinyPortal Rocks!
    • Our FamilyForum
Re: Java SMF automated database backup
« Reply #10 on: May 18, 2007, 07:01:44 AM »

Thanks for a great application!
For some time now I’ve been researching database backup options and trying different ways of doing daily backups with scripts + cronjob and some of them work good but to this point none have given me exactly what I want. Your app appears to do just that, do the backup on a schedule and download it directly to a specified folder on my computer.

So far I like the way it works and not seeing any downside to the app at all.
Thanks… Ken
"If you don't have a stack of failures in your shop, you aren't trying hard enough". --Richard Raffin.


Offline Tanks

  • Full Member
  • ***
  • Posts: 583
  • Gender: Male
  • Danish Dude
Re: Java SMF automated database backup
« Reply #11 on: May 18, 2007, 09:38:01 AM »
Is there anyway to make this not use gzip ?

Offline viulian

  • Jr. Member
  • **
  • Posts: 235
    • Hex.ro
Re: Java SMF automated database backup
« Reply #12 on: May 18, 2007, 10:08:44 AM »
Ken: Thank you for the kind words :)

Tanks:

Nope, not from the GUI.

I add this to the future release for the code.

Can you tell me what the problem is with gzip :) ?
I thought it is perfect (i mean my DB has 40mb and zipped goes down to 10Mb or so). I saw only advantages in using gzip so that's why I'm asking.

Thanks.

Offline Ken.

  • Full Member
  • ***
  • Posts: 496
  • Gender: Male
  • TinyPortal Rocks!
    • Our FamilyForum
Re: Java SMF automated database backup
« Reply #13 on: May 18, 2007, 11:31:50 AM »
Heres a feature request:  ;)

Not knowing to coding requirements for an app like this my request may be way off base, but here it is...
Would you please consider adding the ability for Java SMF Backup to be able to also backup other types of databases? It would be great if it was also able to backup the db for Coppermine that many SMF users have along with their forums.
"If you don't have a stack of failures in your shop, you aren't trying hard enough". --Richard Raffin.


Offline viulian

  • Jr. Member
  • **
  • Posts: 235
    • Hex.ro
Re: Java SMF automated database backup
« Reply #14 on: May 18, 2007, 01:15:14 PM »
Ken, it is possible (easiest for me that is) if coppermine lets you make backup from the webpage (just like on SMF for example, where you can make backups if you login as admin and go to the Forum Maintenance area).

Never used coppermine, that's why I'm asking :)

This application is nothing else, it's just a 'browser' which connects on your behalf to the SMF's admin area, and makes the exact 'clicks' you do when you manually backup your server.
If Coppermine offers such a way of backing up, than it will be easier for me to simulate a user interaction from the code.


Offline Ken.

  • Full Member
  • ***
  • Posts: 496
  • Gender: Male
  • TinyPortal Rocks!
    • Our FamilyForum
Re: Java SMF automated database backup
« Reply #15 on: May 18, 2007, 01:55:59 PM »
There is not a built-in backup with Coppermine, but a plug-in is offered in this thread:
http://coppermine-gallery.net/forum/index.php?topic=40439.0

Please note that it is listed as experimental so I don't know if it would fit for this case.
"If you don't have a stack of failures in your shop, you aren't trying hard enough". --Richard Raffin.


Offline lesmond

  • Semi-Newbie
  • *
  • Posts: 85
  • Gender: Male
    • Hot Hosting Inc.
Re: Java SMF automated database backup
« Reply #16 on: May 18, 2007, 02:58:06 PM »
viulian, Thanks for this :) I have just downloaded (Thanks to Ken, for telling us about it over at TinyPortal) I will let you know how I get on

DOMAINS | WEBHOSTING | IRCD | VPS SERVER | RESELLER

Offline viulian

  • Jr. Member
  • **
  • Posts: 235
    • Hex.ro
Re: Java SMF automated database backup
« Reply #17 on: May 18, 2007, 03:47:06 PM »
Thanks :)

I don't know how the application will behave with TinyPortal's index.php.
You should give it the URL of the forum itself, just as you'll be accessing the forum standalone. Otherwise there might be other 'clicks' in the middle before getting from TP index to SMF's Admin's area, hence the application will not work.


Offline Ken.

  • Full Member
  • ***
  • Posts: 496
  • Gender: Male
  • TinyPortal Rocks!
    • Our FamilyForum
Re: Java SMF automated database backup
« Reply #18 on: May 18, 2007, 04:32:40 PM »
Thanks :)

I don't know how the application will behave with TinyPortal's index.php.
You should give it the URL of the forum itself, just as you'll be accessing the forum standalone. Otherwise there might be other 'clicks' in the middle before getting from TP index to SMF's Admin's area, hence the application will not work.

Thats how mine is set (with a direct link to the forum) and it works as expected... my site is set to automatically go to the forum home page even if only www.mysite.com is entered into your browser, but I haven't tried that to see if it would work.
"If you don't have a stack of failures in your shop, you aren't trying hard enough". --Richard Raffin.


Offline Tanks

  • Full Member
  • ***
  • Posts: 583
  • Gender: Male
  • Danish Dude
Re: Java SMF automated database backup
« Reply #19 on: May 19, 2007, 04:06:28 AM »
Nope, not from the GUI.

I add this to the future release for the code.

Can you tell me what the problem is with gzip :) ?
I thought it is perfect (i mean my DB has 40mb and zipped goes down to 10Mb or so). I saw only advantages in using gzip so that's why I'm asking.

Thanks.

My Gzip times out.. it stopped working when my database hit 10 Mb.. i think its around14-15 Mb now..

And last time i had to run a database backup i could only get it to work with the unpacked sql file..

so thats two reasons for me to not use gzip..  :( even if i wanted to ;)

Ps. as a feature request i would like to see the possibility to restore the database using this tool.. Is that even possible.. the reason why i ask this is because i get all sweaty and nerveous when i go to phpmyadmin or whatever you call that bloody thing.. i want something simple when it comes to my database.. like the roll-back-feature that is buildt into my Windows OS.

Anyway keep up the good work making life as SMF admin simple  ;) And thanks to the Dude who posted the link over at TinyPortal  :D
« Last Edit: May 19, 2007, 04:10:40 AM by Tanks »