Advertisement:

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

Offline viulian

  • Jr. Member
  • **
  • Posts: 235
    • Hex.ro
Re: Java SMF automated database backup
« Reply #40 on: June 01, 2007, 03:36:46 PM »
If you use Internet Explorer, please go to the login prompt and select View menu, and from there the item "Source".
If you are using Mozilla Firefox, again, at the login page (on the ?action=admin URL I mean) press Ctrl-U.

Then, you should search the word "form".


The form tag, in HTML, should look something like
<form .... action="some_string_here" ....>

So please search for form and see, if between the '<' and '>' where the form stands if there an word named 'action'.

Thanks :)

Offline philwojo

  • Semi-Newbie
  • *
  • Posts: 20
Re: Java SMF automated database backup
« Reply #41 on: June 01, 2007, 03:49:22 PM »
I use firefox and do see several instances of that and they all have this link:

<form action="http://www.AAAAAAAA.com/forum/index.php?action=login2 [nofollow]" method="post" accept-charset="ISO-8859-1" name="frmLogin" id="frmLogin" onsubmit="hashLoginPassword(this, 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx');">

Phil

Offline viulian

  • Jr. Member
  • **
  • Posts: 235
    • Hex.ro
Re: Java SMF automated database backup
« Reply #42 on: June 01, 2007, 04:02:01 PM »
Can you please PM me with an URL to your forum ?
I do not need any username / password - I just need to make sure that when you type in "http://www.AAAAAAAA.com/forum/index.php?action=login" you actually see an SMF login.

Maybe you have an additional password set in a .htaccess file which the browser lets you through as you already saved it, and only after that you are prompted with the forum login ?

I am sure that's something with a form that doesn't have an action :) but I can only prove it if I have a look..

Offline DreAmTaKeR

  • Newbie
  • *
  • Posts: 1
Re: Java SMF automated database backup
« Reply #43 on: November 17, 2007, 09:53:32 PM »
Thank you   :D

Offline Matthew Schenker

  • Jr. Member
  • **
  • Posts: 396
  • Gender: Male
Re: Java SMF automated database backup
« Reply #44 on: November 30, 2007, 09:27:51 AM »
Hello,
I was using this tool when I was running Windows XP.  But I recently got rid of Windows and changed all my systems over to Linux (Kubuntu).

I would like to run the Java SMF Backup tool on Kubuntu, but I'm a little lost about how to do it.  Has anyone done this, and if so can you post tips or suggestions?

Thanks!

Offline viulian

  • Jr. Member
  • **
  • Posts: 235
    • Hex.ro
Re: Java SMF automated database backup
« Reply #45 on: November 30, 2007, 12:57:07 PM »
Sure!

For Ubuntu (I did not use Kubuntu but I assume it's almost the same) I did the following:

1. Install Sun Java SDK 1.5, Ant (for compilation)

Code: [Select]
apt-get install sun-java5-jdk
apt-get install ant

(and please accept the other dependencies / licenses).

2. Test the installation

You should issue
Code: [Select]
java -version and see an output such as:

Code: [Select]
root@glimpses:~# java -version
java version "1.5.0_13"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_13-b05)
Java HotSpot(TM) Client VM (build 1.5.0_13-b05, mixed mode, sharing)

3. Download Java SMF Backup zip (from the Downloads page) or from my page:

Code: [Select]
wget http://www.hex.ro/wb/tracker/EasyTracker.php?id=3
Unzip it then cd to the directory:

Code: [Select]
unzip JavaSMFBackup_v101.zip
cd JavaSMFBackup

4. Compile:

a) Edit file build.xml from the JavaSMFBackup directory and remove these three lines:

Code: [Select]
  <!-- launch4j task definition -->
  <taskdef name="launch4j" classname="net.sf.launch4j.ant.Launch4jTask"
    classpath="${launch4j.dir}/launch4j.jar :${launch4j.dir}/lib/xstream.jar" />

b) Issue ant command

Code: [Select]
ant
You should see an output like this:

Code: [Select]
root@glimpses:~/JavaSMFBackup# ant
Buildfile: build.xml

init:
    [mkdir] Created dir: /root/JavaSMFBackup/bin
    [mkdir] Created dir: /root/JavaSMFBackup/dist
    [mkdir] Created dir: /root/JavaSMFBackup/installers

compile:
    [javac] Compiling 14 source files to /root/JavaSMFBackup/bin

dist:
    [mkdir] Created dir: /root/JavaSMFBackup/bin/img
     [copy] Copying 9 files to /root/JavaSMFBackup/bin/img
      [jar] Building jar: /root/JavaSMFBackup/dist/SMFBackup.jar
     [copy] Copying 1 file to /root/JavaSMFBackup

BUILD SUCCESSFUL
Total time: 4 seconds

c) From the same directory, issue

Code: [Select]
java -jar SMFBackup.jar
You should see the window and be able to use it as you did on Windows.
Maybe you should add a shortcut to your desktop (with running directory /root/JavaSMFBackup and command the java -jar from above.

Please let me know if it worked :)

Here's a proof (my setup is Ubuntu 6.06 with TightVNC as X window manager):




Offline Matthew Schenker

  • Jr. Member
  • **
  • Posts: 396
  • Gender: Male
Re: Java SMF automated database backup
« Reply #46 on: November 30, 2007, 04:53:17 PM »
viulian,
Thanks for the help on getting Java SMF Backup to run.

I'm still kind of new at using Linux, so all those steps get me a little anxious.  But I'll dive in later and give it a try, the report on how it works.

Thanks again,
Matthew

Offline viulian

  • Jr. Member
  • **
  • Posts: 235
    • Hex.ro
Re: Java SMF automated database backup
« Reply #47 on: December 05, 2007, 05:21:21 AM »
Matthew,

Did you get some time to set things up ? How did it went ?

Offline Matthew Schenker

  • Jr. Member
  • **
  • Posts: 396
  • Gender: Male
Re: Java SMF automated database backup
« Reply #48 on: December 06, 2007, 03:41:40 PM »
&lt;br /&gt;Matthew, &lt;br /&gt;&lt;br /&gt;Did you get some time to set things up ? How did it went ?&lt;br /&gt;

Unfortunately, I can't seem to get it working.

For now, I'll just use the built-in backup system in SMF Admin > Forum Maintenance - Backup Database.

I'm still getting up to full speed on Linux, so it's probably something I'm doing wrong!

Matthew
« Last Edit: December 06, 2007, 03:44:02 PM by Matthew Schenker »

Offline viulian

  • Jr. Member
  • **
  • Posts: 235
    • Hex.ro
Re: Java SMF automated database backup
« Reply #49 on: December 06, 2007, 03:47:21 PM »
Ok, I understand

I might help with your problem if you give me some error messages. But if you're ok with the standard backup, no rush :)


Offline AlphaHot1

  • Semi-Newbie
  • *
  • Posts: 40
Re: Java SMF automated database backup
« Reply #50 on: January 10, 2008, 12:55:56 PM »
Thanks for the great program. Any chance that we'll have a command line only version?

It just needs to run the backup, everything else it's fine from the gui.

Something like:

SMFBackup -doBackup

This way I can use it with wget and do fully automated backup, it wold be wonderful, thanks ;)

Offline viulian

  • Jr. Member
  • **
  • Posts: 235
    • Hex.ro
Re: Java SMF automated database backup
« Reply #51 on: January 10, 2008, 02:49:26 PM »
Never thought of it :) and thank you for the kind words.
I liked more the ideea of seeing the log, the download speed, so I did not do a command line version.

Anyway, I would like to work on a different approach on the next version I work on. The trouble with the forum is that if the database reaches sizes of 150Mb or so, forum's built in backup doesn't work anymore as php process doing the backup will die with an 'Out of memory' error.

But I'll try and add - if you have any ideeas, please let me know :)

Offline AlphaHot1

  • Semi-Newbie
  • *
  • Posts: 40
Re: Java SMF automated database backup
« Reply #52 on: January 10, 2008, 09:16:25 PM »
Thanks for the quick response, however I've found an opern source php script phpMyBackuPro which can do a scheduled dump of the db on the server, so if it works I have just to download everything with wget ;)

Offline viulian

  • Jr. Member
  • **
  • Posts: 235
    • Hex.ro
Re: Java SMF automated database backup
« Reply #53 on: January 11, 2008, 05:40:41 AM »
Yeah, that's another good ideea - given that you have access to a shell / crontab editor. I too do backups that way (but created my own cronjob as it was less hassle - using mysqldump instead of php).

Offline AlphaHot1

  • Semi-Newbie
  • *
  • Posts: 40
Re: Java SMF automated database backup
« Reply #54 on: January 11, 2008, 10:29:18 AM »
I agree: my idea is to use crontab on my local machine beacause I don't have any shell account on the server neither I can use mysqldump (the db on my host accepts connection from localhost only).
That php script can do a scheduled backup in a clever manner: it loads the script everytime the main forum index is loaded (with a transparent gif ora an invisible frame), and if enough time has passed since the previus backup, it runs the backup.

This way I can do everythong from my local machine with wget and cron. The other solution would be to use your app via command line, but if I can I'll save you the hassle ;)

Thanks!

Offline Oscar

  • Semi-Newbie
  • *
  • Posts: 22
Re: Java SMF automated database backup
« Reply #55 on: January 29, 2008, 11:23:28 AM »
Thank you for the program. I like the simple interface and easy to use schedule options. (I do not always remember to make back-ups of the database.)

Two questions:

+ Doe this application make a complete backup of the database? (As in could I use its file for a full restoration of everything in the sql database?)

+ Does anyone have tool that will restore a large database? Could that be built into this application? (My sql.gz files are too large to upload via phpadmin and I do not have shell access.)

Thanks,
Oscar

Offline viulian

  • Jr. Member
  • **
  • Posts: 235
    • Hex.ro
Re: Java SMF automated database backup
« Reply #56 on: January 29, 2008, 04:29:55 PM »
Hi Oscar!

Thank you for using my software!

1) the application makes a complete backup, yes. It is actually a 'browser' which does the clicks for you and downloads the database that in fact the forum admin page creates. And that's complete (in fact I use these databases to setup my local environment and it works).

2) Application doesn't have support for restore. It tries to do what's 'painful' to do [having regular backups] however a restore is very rarely needed. And if it happens, you should just upload the latest .sql via FTP along with, for example, the script from here: http://www.ozerov.de/bigdump.php; you execute script and it should do the import for itself then).

But yes, it can be built in the application - however - only few people have requested it so I didn't thought of it as a priority..

I'll think about it :)


Offline kizer

  • Jr. Member
  • **
  • Posts: 383
  • Gender: Male
    • Links4Jeeps.com
Re: Java SMF automated database backup
« Reply #57 on: February 04, 2008, 12:53:25 PM »
Awesome app. I use it every day. I let my PC at home idle and it backsup. At first I didn't trust it so I backed up and opened up the files and looked for that last post and sure enough it was there.

Restore feature would be cool like requested an or a command line for us command line junkies. I run BSD at home so it would be great to let it do its thing several times a day so I dont have to worry about it.

Anyways thanks for the app.
Own a Jeep? Links4Jeeps.com

Offline mitch2k

  • Newbie
  • *
  • Posts: 6
Re: Java SMF automated database backup
« Reply #58 on: February 06, 2008, 03:56:38 AM »
Hey! The backup tool looks great. But I keen getting this error:

 09:55:53] Method failed (downloadAction): HTTP/1.1 500 Internal Server Error

Any idea?

Offline viulian

  • Jr. Member
  • **
  • Posts: 235
    • Hex.ro
Re: Java SMF automated database backup
« Reply #59 on: February 06, 2008, 04:48:05 AM »
Can you do backups using SMF admin web interface ?
Please try it, I think you are getting the internal server error too there (probably some redirects or some additional security added in .htaccess file - assuming that you are using Apache).

Please check and let me know.