• Welcome to Simple Machines Community Forum. Please login or sign up.

Java SMF automated database backup

Started by viulian, September 24, 2006, 05:00:55 PM

Previous topic - Next topic

tfs

Not sure what and when it started, but this isn't working for me any more unless I turn off compression.

[24/02 16:51:03] Backup notification received.
[24/02 16:51:03] Starting backup procedure.
[24/02 16:51:03] Connecting to admin backend.
[24/02 16:51:04] Sending password...
[24/02 16:51:04] Attempting to load the admin page.
[24/02 16:51:06] Got a redirect. Checking if password was ok...
[24/02 16:51:07] Requesting the backup file.
[24/02 16:51:10] Downloading...
[24/02 16:51:10] Using file: I:\WWW\C3M_HelpDesk\Backups\JavaSMFBackup\Backups\patsong.com_24Feb12_165110.sql.gz
[24/02 16:51:10] Download complete. [more than 0 kb/s]
[24/02 16:51:10] Automatic backups disabled for this forum. Sleeping...


Note the "more than 0 kb/s" message.  I get a zero byte gz file.  If I turn off compression it appears to work properly, producing a SQL file.
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

viulian

Your forum is getting bigger :)

Basically the PHP script on the server side ran out of memory when trying to ZIP the entire thing in memory before sending it to you.
You either have to increase the maximum allowed memory in server's php.ini, or continue to download unpacked...

I am 99.99% sure this is the problem. To see, it will also fail if you try to download from the forum admin interface as zip and you will find an error message somewhere in the server logs (not on forum logs).

toma

I'm running into a problem after i installed DreamPortal on my SMF forum. The password and username and version is correct, but this is the result:

[13/05 23:47:08] Backup notification received.
[13/05 23:47:08] Starting backup procedure.
[13/05 23:47:08] Connecting to admin backend.
[13/05 23:47:08] Sending password...
[13/05 23:47:08] Attempting to load the admin page.
[13/05 23:47:08] Got a redirect. Checking if password was ok...
[13/05 23:47:08] smfbackup.http.SMFException: Access denied (have you correctly chosen the forum version?).
   at smfbackup.http.SMFConnection.doBackup(SMFConnection.java:336)
   at smfbackup.http.SMFConnection.doJob(SMFConnection.java:500)
   at smfbackup.run.Manageable.run(Manageable.java:29)

The debug log says:
2013-05-13 23:55:50,494 [ailu.org_thread] ERROR   smfbackup.http.SMFConnection  - No "sesc" or "sc" input field found in the reply page. Cannot proceed.
2013-05-13 23:55:50,494 [ailu.org_thread] ERROR   smfbackup.http.SMFConnection  - Exception occured:



viulian

Hello,

I need to install Dream Portal just to see what happens with the admin page .. will let you know as soon as possible.

viulian

Hello,

Sorry for the late reply - I've just installed Dream Portal on my test forum and everything works correctly. These are the values:

Forum URL: http://192.168.0.101/community/index.php
SMF Version: 2.0

(using Dream Portal v1.1 and SMF 2.0.4)

What is your configuration ?

rajeshvv

HI
I had installed the tool and while adding new forum settings am able to see the version up to 2.0 Rc2.X
how about compatibility for smf 2.0.4 version.
please let me know
cheers

Rajesh

viulian

Hello,

It does work with that version - I am using it like that :)

Give it a try,

rajeshvv

Quote from: viulian on July 31, 2013, 02:53:38 PM
Hello,

It does work with that version - I am using it like that :)

Give it a try,


HI,

I am pleased to use this plugin... it works great for first backup... once I scheduled for second backup fro next day the login was not success.. showing

Sending password...
smfbackup.http.SMFException: Login failed (no redirect received to the forum's admin page).

at smfbackup.http.SMFConnection.doBackup(SMFConnection.java:206)

at smfbackup.http.SMFConnection.doJob(SMFConnection.java:496)

at smfbackup.run.Manageable.run(Manageable.java:29)


please help me... ):
cheers

Rajesh

toma

Quote from: viulian on May 25, 2013, 02:22:22 AM
Hello,

Sorry for the late reply - I've just installed Dream Portal on my test forum and everything works correctly. These are the values:

Forum URL: http://192.168.0.101/community/index.php
SMF Version: 2.0

(using Dream Portal v1.1 and SMF 2.0.4)

What is your configuration ?

Hi Viulian,
i use exactly that as an URL ( SMF 2.06) the error is as follows:

[12/12 20:48:29] Connecting to admin backend.
[12/12 20:48:29] javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

   at sun.security.ssl.Alerts.getSSLException(Unknown Source)

   at sun.security.ssl.SSLSocketImpl.fatal(Unknown Source)

   at sun.security.ssl.Handshaker.fatalSE(Unknown Source)

   at sun.security.ssl.Handshaker.fatalSE(Unknown Source)

   at sun.security.ssl.ClientHandshaker.serverCertificate(Unknown Source)

   at sun.security.ssl.ClientHandshaker.processMessage(Unknown Source)

   at sun.security.ssl.Handshaker.processLoop(Unknown Source)

   at sun.security.ssl.Handshaker.process_record(Unknown Source)

   at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)

   at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)

   at sun.security.ssl.SSLSocketImpl.writeRecord(Unknown Source)

   at sun.security.ssl.AppOutputStream.write(Unknown Source)

   at java.io.BufferedOutputStream.flushBuffer(Unknown Source)

   at java.io.BufferedOutputStream.flush(Unknown Source)

   at org.apache.commons.httpclient.HttpConnection.flushRequestOutputStream(HttpConnection.java:828)

   at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2116)

   at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096)

   at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)

   at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)

   at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)

   at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)

   at smfbackup.http.SMFConnection.doLogin(SMFConnection.java:120)

   at smfbackup.http.SMFConnection.doBackup(SMFConnection.java:206)

   at smfbackup.http.SMFConnection.doJob(SMFConnection.java:477)

   at smfbackup.run.Manageable.run(Manageable.java:29)

Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

   at sun.security.validator.PKIXValidator.doBuild(Unknown Source)

   at sun.security.validator.PKIXValidator.engineValidate(Unknown Source)

   at sun.security.validator.Validator.validate(Unknown Source)

   at sun.security.ssl.X509TrustManagerImpl.validate(Unknown Source)

   at sun.security.ssl.X509TrustManagerImpl.checkTrusted(Unknown Source)

   at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)

   ... 21 more

Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

   at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(Unknown Source)

   at java.security.cert.CertPathBuilder.build(Unknown Source)

   ... 27 more

[12/12 20:48:29] Next run at: 13.12.2013 1:45:00
[12/12 20:49:10] Aborting connection. Terminating active connection.
[12/12 20:49:10] Reloading the forum configuration.
[12/12 20:49:10] Configuration reloaded
[12/12 20:49:10] Next run at: 13.12.2013 1:45:00


toma


viulian

Hello,

It might be that your server automatically redirects http traffic over https ... but I have never tested the application against https URLs so I can't really tell if it is a bug in the app or in the communication with the server. However, for sure there is a redirect over https (type http://facebook.com in the browser and you'll see that you'll end up with https://facebook.com and with a secure page).

I guess something like this happens on your configuration too ?

hugbear

Hi, Iulian!

I' ve been trying to get this working with the latest version of SMF (2.0.9) and I'm only getting this log (DEBUG level for JavaSMFBackup v. 1.4.0, 03 Aug 2011 at hex.ro/wp/projects/java-smf-backup/):

2015-01-24 21:56:41,347 [t.ro/smf_thread] INFO    smfbackup.http.SMFConnection  - Connecting to http://hugb...ro/smf/index.php?action=admin
2015-01-24 21:56:42,559 [t.ro/smf_thread] INFO    smfbackup.http.SMFConnection  - Issuing POST to http://hugb...ro/smf/index.php?PHPSESSID=96...h1&action=login2
2015-01-24 21:56:43,285 [t.ro/smf_thread] INFO    smfbackup.http.SMFConnection  - Issuing GET on http://hugb...ro/smf/index.php?topic=9.0
2015-01-24 21:56:44,453 [t.ro/smf_thread] INFO    smfbackup.http.SMFConnection  - Maintain: POST to http://hugb...ro/smf/index.php?action=admin;area=maintain;sa=database
2015-01-24 21:56:45,517 [t.ro/smf_thread] ERROR   smfbackup.http.SMFConnection  - No "sesc" or "sc" input field found in the reply page. Cannot proceed.
2015-01-24 21:56:45,517 [t.ro/smf_thread] ERROR   smfbackup.http.SMFConnection  - Exception occured:
smfbackup.http.SMFException: Access denied (have you correctly chosen the forum version?).    /* Obviously, SMF 2.0 chosen in "Manage forum" setting */
at smfbackup.http.SMFConnection.doBackup(SMFConnection.java:336)
at smfbackup.http.SMFConnection.doJob(SMFConnection.java:500)
at smfbackup.run.Manageable.run(Manageable.java:29)


Is there a way to get this going?

Thanks!

hartiberlin

Hi,
is there a problem with Windows 7 64 Bit ?

It says, when I want to install the version
JavaSMFBackup_1.4.0_setup.exe

He can not access the data and I might not have the right permissions...

What can this be ?

Don´t I have the right Java version or is
JavaSMFBackup_1.4.0_setup.exe
not compatible with Windows 7 64 Bit version ?

P.S. What are other good backup tools for a big SMF 2.09 forum ?

Many thanks.

Regards, Stefan.

tfs

I used to use this years ago but had to remove Java from my machines due to security policies. Does anyone know of something akin to this program that doesn't need Java installed?

I'm looking  to automate a backup of our MySql database that sits on an Ionos web hosted site.
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

Sir Osis of Liver

"The best laid schemes o' mice an' men / Gang aft a-gley." - Robert Burns

Biology Forums

I was thinking why would anyone need this

Sir Osis of Liver

Decent host packages should include daily 30-day backup of all files and databases (mine does), many crappy hosts do not, or charge extra for it (GD :P).  In the absence of reliable backup service, you can do it with cron jobs (if host supports cron jobs, some don't).  Without regular backups, you run the risk of losing years of forum content if server crashes or host screws up.  I've seen this happen more than once.
"The best laid schemes o' mice an' men / Gang aft a-gley." - Robert Burns

tfs

I've never setup a cron job before and am a little nervous about doing it. Specifically, where does the backup file go and can I have it emailed to me like I can do with MySQLDumper? What I'm really looking for is something with a UI that can run via a scheduler. This JAVA program used to do that for me.

The backup files should be named using the DB name (I have more than one), and the date. It should allow me to rotate backups for X days... etc.

Can a cron job do something like that?
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

Sir Osis of Liver

You can create a cron job that backs up all databases to a server directory, from where you can download them to local drive.  I have it set up so daily backups, which have same file names every day, are copied to subdirectory with prefix added that is current date (i.e., today's dump is smf20.sql, renamed to 29_smf20.sql) so they're not overwritten next day.  It gives me 30 days of backups for each database.  Never tried emailing dumps, but that could be problematic if databases are very large.

"The best laid schemes o' mice an' men / Gang aft a-gley." - Robert Burns

tfs

Since I don't really have "access" to the servers at Ionos, but use their web based user interface, I'm just not comfortable doing it. I know there's tools out there like this Java SMF backup, which worked great when I used it. And it could be easily automated via a UI that was fairly obvious to use.

Maybe I'll look at some type of browser macro that interfaces with MySQLDumper.
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

Advertisement: