Copy an existing installation to another machine

classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|

Copy an existing installation to another machine

nsid
Hi all,

First of all congratulations for the excellent software.

I installed the software to a Windows machine and I did a lot of customization. Now, I would like to copy(?) this installation to another windows machine?

I guess that I will install again newgenlib but is there anyway to copy my installation to the new machine. I don't want to lose my customization (bib records, patrons, etc).

P.S. Could you also direct me to a backup (how to) documentation?

Thank you
Reply | Threaded
Open this post in threaded view
|

Re: Copy an existing installation to another machine

pedroparkero
For backup, check the pgAdmin III steps here: http://newgenlib.wikispaces.com/How+to+take+a+backup+of+my+database%3F (As the new version uses PostreSQL 8.3, look for that directory instead of 8.0)
The instructions on how to import your backup to a new installation is here: http://www.verussolutions.biz/kb/installwithdbbackup
-------------------------------------------------
With great knowledge comes great responsibility.
Reply | Threaded
Open this post in threaded view
|

Re: Copy an existing installation to another machine

nsid
Hi Pedro,

Thank you for the response and for linking the documentation.

As I show from the documentation the backup keeps the data (bib records, patrons, etc).

What about the webopac modifications (e.g. contact information etc)?

Should I also use to the new installation the c:ngl302 and c:newgenlib files???
Reply | Threaded
Open this post in threaded view
|

Re: Copy an existing installation to another machine

pedroparkero
You should copy the folder of where the OPAC modified files are and overwrite the folder of the new installation with your copy.
-------------------------------------------------
With great knowledge comes great responsibility.
Reply | Threaded
Open this post in threaded view
|

Re: Copy an existing installation to another machine

nsid
Ok I see. I hope that if I copy the whole c:ngl302 directory I won't face any problem.
Reply | Threaded
Open this post in threaded view
|

Re: Copy an existing installation to another machine

pedro parkero
You don't need to copy the whole folder. Just C:\NGL302\apache-tomcat-6.0.32\webapps\resources\portal\web_pages\LIB_1 That's the folder where you have modified the files, right?
Reply | Threaded
Open this post in threaded view
|

Re: Copy an existing installation to another machine

nsid
Yes, I did it. I copied the folder LIB_1 only and it was what I wanted. Thank you very much!
Reply | Threaded
Open this post in threaded view
|

Re: Copy an existing installation to another machine

pedroparkero
Now I'm the one having problems. I'm trying to export our local installation to a new machine that will serve as a server. And every time I check whether NGL works by going to the OPAC, the following is what I see:
OPAC after installing NGL in new machine

It's a never ending frame within a frame within a frame of html, with no search boxes. Why does it happen? I'm using an XP SP2 machine.

If anyone knows how to solve this, please inform me. Thanks in advance...
-------------------------------------------------
With great knowledge comes great responsibility.
Reply | Threaded
Open this post in threaded view
|

Re: Copy an existing installation to another machine

Verus Open Source Support
This happens when apache tomcat server is unable to connect to database. Check the following

1. Is the postgresql databse running (You can check this through your pg admin)
2. Check the database url in C:/NewGenLibFiles/HibernateConfig/dbconnection.xml
Since you copied files from another system, that system's IP address might be there. Change it, Save it and start your NGL Server again
Please let us know if this worked
NewGenLib Open Source Support
Verus Solutions Private Limited
www.verussolutions.biz
Reply | Threaded
Open this post in threaded view
|

Re: Copy an existing installation to another machine

pedroparkero
1. How do you check thru pg admin? If I need to check if the Postgres service is running, it is running according to the Control Panel -> Administrative Tools -> Services.
2. According to the dbconnection.xml, here is the link I found:
    <property name="hibernate.connection.url">
       jdbc:postgresql://localhost:5432/newgenlib
    </property>
should it be the one I'm looking for? As I didn't change anything, it still doesn't work. :(
-------------------------------------------------
With great knowledge comes great responsibility.
Reply | Threaded
Open this post in threaded view
|

Re: Copy an existing installation to another machine

Verus Open Source Support
Yes...you can check it through the services also.
I request you to connect through pgadmin3 and check the following
1. Is the postgresql port 5432? If not, make a note of the port number. And put the value in dbconnection.xml
2. Check whether database name is newgenlib
3. Under login roles, check if a role newgenlib is there. If it is not there create a user newgenlib (I am assuming the password is also newgenlib)
............................
Now open your dbconnection.xml again, check if user name and password are newgenlib
.............................
Check your firewall settings, see if the postgresql port is added in your firewall exception. Or temporarily disable firewall
........................
Start NGL Server again
NewGenLib Open Source Support
Verus Solutions Private Limited
www.verussolutions.biz
Reply | Threaded
Open this post in threaded view
|

Re: Copy an existing installation to another machine

pedroparkero
Yes, it is 5432. There is login role and both the name and password is newgenlib.
And the following excerpt of the dbconnection.xml show the correct connecting info:
       jdbc:postgresql://localhost:5432/newgenlib
    </property>
    <property name="hibernate.connection.driver_class">
       org.postgresql.Driver
    </property>
    <property name="hibernate.connection.username">newgenlib</property>
    <property name="hibernate.connection.password">newgenlib</property>

 And I've already opened both UDP & TCP port 5432 in the Windows Firewall. It still didn't work. >_<
-------------------------------------------------
With great knowledge comes great responsibility.
Reply | Threaded
Open this post in threaded view
|

Re: Copy an existing installation to another machine

Verus Open Source Support
Close Tomcat server and run it again. Observe the command window carefully....You will get a message
**************************** HomeFactoryCalled ************************************
Os name Identified
C://NewGenLibFiles/HibernateConfig/dbconnection.xml


It will stop at this message for a very long period (because Tomcat will be trying to connect to database)
After a while below the above message you will get the error. You may have to immediately click on Ctrl-C as soon as the error starts printing

Please send that message
NewGenLib Open Source Support
Verus Solutions Private Limited
www.verussolutions.biz
Reply | Threaded
Open this post in threaded view
|

Re: Copy an existing installation to another machine

pedroparkero
Okay, here it is. The error was very fast, so I had no choice but to run "RunNGL3Server.bat > test.txt 2>&1" in the command line just so I can capture it:

java.sql.SQLException: ERROR: relation "library" does not exist
        at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1365)
        at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1160)
        at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:172)
        at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:387)
        at
-------------------------------------------------
With great knowledge comes great responsibility.
Reply | Threaded
Open this post in threaded view
|

Re: Copy an existing installation to another machine

Verus Open Source Support
Problem: Database restoration did not take place properly.
Solution:
On your System 1 (Which holds the actual installation)
1. Take a backup using pagmin3 (compressed backup)
2. Copy this backup file into your target system

On your system 2 (Target system)
1. Close all applications
2. Open PgAdmin. Select newgenlib database and right click and delete/drop it
3. Create a new database newgenlib (encoding UTF8, owner newgenlib...rest of all the parameters can be left as they are)
4. Select newgenlib database, right click and click on restore. Now point to the backupfile you have taken from your System 1.
5. Check the number of tables after the restoration process. They must be approximately 308.
Thats it

6. Start Tomcat server
7. Build Index
NewGenLib Open Source Support
Verus Solutions Private Limited
www.verussolutions.biz
Reply | Threaded
Open this post in threaded view
|

Re: Copy an existing installation to another machine

pedroparkero
Oooh, such a simple solution to the problem. *facepalm* The OPAC now works splendidly. Thank you very much!

Just curious: what may be the reason why database restoration didn't automatically take place? It's already in a plain format, with insert option. And the process takes any filename you give the backup, right?
-------------------------------------------------
With great knowledge comes great responsibility.