Forum LAMS for Tech-Heads - General Forum: Re: Help with restore backup


 
Search: 

2: Re: Help with restore backup
In response to 1 01/18/14 01:14 PM
[ Reply | Forward ]
Hi Mario,

It's actually not too hard.

What you've got to do is to copy the database and all the repository and uploaded files from the old server to the new one.

Here's the breakdown:

In the old server and assuming that you installed it also in there via apt-get, create a database dump of the LAMS db:


$ mysqldump --hex-blob -u lams -plamsdbpasswd lams > /tmp/lams-dump.sql
Then copy this dump file and the entire content of the following folders to the new server:

Uploaded content


/usr/share/jboss-5.1/server/default/deploy/lams.ear/lams-www.war

and

Repository files


/var/lib/lams/repository
On the new server, make sure that LAMS is stopped.

Then start by dropping the existing db and creating a new one.


$ mysql -u lams -plamsdbpasswd lams

Then in the mysql prompt drop the lams database:


mysql> drop database lams;

Now, create the DB again:


mysql> CREATE DATABASE lams DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;

Now exit mysql and import the db dump from the old server:


$ mysql -u lams -plamsdbpasswd lams < lams-dump.sql

Copy the folders that you moved from the old server to the exact same paths in the new server.

Restart LAMS and that should do it.

Let me know if you have any questions

Posted by Ernie Ghiglione

3: Re: Re: Help with restore backup
In response to 2 01/20/14 08:52 AM
[ Reply | Forward ]
All this works if the old and the new LAMS are connected to Moodle??
Of course I got the new one connected to my moodle, I'm not using anymore the old one.

Posted by mario donoso

4: Re: Re: Re: Help with restore backup
In response to 3 01/21/14 09:20 AM
[ Reply | Forward ]
Hi Mario,

Yes, it should work even if you had the old one integrated with Moodle.

Just make sure you change the corresponding URLs in the integration settings.

Thanks,

Ernie

Posted by Ernie Ghiglione

5: Re: Re: Re: Re: Help with restore backup
In response to 4 01/22/14 02:13 PM
[ Reply | Forward ]
Hello Ernie, thanks for your help, I did everything you say, but still have a problem:
Fisrt, the directory /var/lib/lams/repository didn't exist in my LAMS server, so I made it and put everything you said
Second: the /usr/share/jboss-5.1/server/default/deploy/lams.ear/lams-www.war didn't exist either but instead I had /usr/share/jboss-4.0.2/server/default/deploy/lams.ear/lams-www.war but I did what you said with that.

I add the server in lams and moodle and everything is ok, BUT when I try to create a new LAMS Lesson I only got a blank page... when I try to open older lesson I got this error:

java.lang.NullPointerException: Unknown runtime exception! Esconder detalles
java.lang.NullPointerException at org.lamsfoundation.lams.learning.web.util.ActivityMapping.getProgressForward(ActivityMapping.java:131) at org.lamsfoundation.lams.learning.web.action.DisplayActivityAction.execute(DisplayActivityAction.java:105) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414) at javax.servlet.http.HttpServlet.service(HttpServlet.java:697) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.lamsfoundation.lams.web.filter.LocaleFilter.doFilterInternal(LocaleFilter.java:142) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.lamsfoundation.lams.web.session.SystemSessionFilter.doFilter(SystemSessionFilter.java:71) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:174) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:153) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.lamsfoundation.lams.integration.security.SingleSignOn.invoke(SingleSignOn.java:121) at org.lamsfoundation.lams.integration.security.LoginRequestValve.invoke(LoginRequestValve.java:67) at org.apache.catalina.valves.FastCommonAccessLogValve.invoke(FastCommonAccessLogValve.java:481) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112) at java.lang.Thread.run(Thread.java:662)



I appreciate your help, thanks a lot.

Posted by mario donoso

6: Re: Re: Re: Re: Re: Help with restore backup
In response to 5 01/22/14 02:22 PM
[ Reply | Forward ]
And when I try to open another lessons I get the login page of my LAMS.

Posted by mario donoso

7: Re: Re: Re: Re: Re: Re: Help with restore backup
In response to 6 01/23/14 08:12 AM
[ Reply | Forward ]
If I try to go directly to the LAMS website, now I see sections, but when I try to create a lesson, this message appears: Not authorized to perform this function.

Posted by mario donoso

8: Re: Re: Re: Re: Re: Re: Re: Help with restore backup
In response to 7 01/23/14 11:29 AM
[ Reply | Forward ]
Hi Mario,

You probably need to change the "Server URL" setting in the "Edit configuration settings" in the sysadmin menu.

Thanks,

Ernie

Posted by Ernie Ghiglione

9: Re: Re: Re: Re: Re: Re: Re: Re: Help with restore backup
In response to 8 01/23/14 01:03 PM
[ Reply | Forward ]
Hey Ernie, must be the desperation to have LAMS working just now and my fault, but I really want to thank you for all your help. Totally working!
Thanks again.

Posted by mario donoso

Reply to first post on this page
Back to LAMS for Tech-Heads - General Forum