talk@lists.collectionspace.org

WE HAVE SUNSET THIS LISTSERV - Join us at collectionspace@lyrasislists.org

View all threads

Re: [Talk] Upgrading and migrating to new server

EG
Elayne Glantzberg
Fri, Nov 17, 2017 2:34 AM

Thank you so much, guys, this was definitely the information I needed!

And yet...I'm stuck again. Everything looks beautiful until I actually go to login to the new system, at which point I get an error message saying the connection to the services API failed. So close...

Can you help me from this point? Here's a log of what I've done so far. All of the data should be on the new system and intact at this point.

  • Follow v4.4 installation through psql section, then rsync dump file and restore
  • Continue v4.4 installation through setting up tomcat section, then rsync apache-tomcat-7.0.57/nuxeo-server/data
  • Update environment variables
  • Create collectionspace-source directory, then rsync from old server
  • Run build and deploy mvn commands, then "ant undeploy deploy" with no arguments (to preserve existing data)
  • start up server "$CSPACE_JEESERVER_HOME/bin/startup.sh"
  • Go to website homepage
  • Try to login
  • Got "Connection to the Services API failed. Service layer may have failed to start or needs to be restarted."
  • tested ":8180/cspace-services/acquisitions" and got a failure
  • shut down server
  • rerun "ant undeploy deploy" as root from services folder; BUILD FAILED
  • added environment variables to root bash, source
  • rerun "ant undeploy deploy" as root from services folder
  • start up server -- same error
  • shut down server
  • rerun all build and deploy commands as root, both mvn and ant -- still failed

Thank you,

Elayne Glantzberg
Database Administrator

Aquarian Tabernacle Church

-------- Original Message --------
Subject: Re: [Talk] Upgrading and migrating to new server
From: Ray Lee <rhlee@berkeley.edu>
Date: Thu, November 16, 2017 6:09 pm
To: Yousuf Nejati <yousufnejati@gmail.com>
Cc: Elayne Glantzberg <solinox@solinoxenterprises.com>, CollectionSpace
Talk List <talk@lists.collectionspace.org>

Hi Elayne,
I second everything Yousuf said. I usually do this in three steps:1. Install a fresh copy of CSpace on the new server. Make sure it's accessible by a browser, and you can save records.
2. Install your customizations, if any. This means transferring over any customizations you have in the services, application, and ui source code directories. We store our customizations in GitHub, so I do a git clone on the new server to install them. After building and deploying, you should see your customizations on the new server. If you didn't customize CollectionSpace, skip this.
3. Transfer your data. I usually rsync the nuxeo-server/data directory to transfer binaries, and then use pg_dump to dump the postgres databases, and restore them on the new server with pg_restore.

Ray

On Thu, Nov 16, 2017 at 12:42 PM, Yousuf Nejati <yousufnejati@gmail.com> wrote:

Hi Elayne,

Since you are pressed for time, I would suggest sticking with v4.4 for now on the new host server and then upgrading to v4.5 at a later date. There are different ways to go about this and it varies depending on how you've implemented your system. However, my brief suggestions should work in most cases.

I would create a remote git project repository (Github, Bitbucket, Gitlab, etc.) for all three layers of CollectionSpace (ui, application, and services) and store your source code there so that you may recreate it on the new host server. I would then shut down your CollectionSpace instance and preform an all database dump. Then, I would copy and compress the data directory that contains your blobs, which is located at apache-tomcat-7.0.57/nuxeo-server/data. Both the database dump file and the compressed data directory can then be copied to your new host server for the restore. Be sure to also make a copy of the environmental variables found in your .bashrc or similar so that they can be recreated on the new host server.

On the new host server follow the CollectionSpace manual installation instructions for your host server. This time, instead of cloning the source code from the CollectionSpace remote code repository, clone your source code, that you pushed to a remote repository in the last step, locally. Add your env variables to the .bashrc of the cspace user on the new host server. Restore the database on your new host server with the database dump. Decompress and add the copy of the data directory to its location on the new host server. Finish the install. Do not recreate the database when you run the ant undeploy deploy task after you restored the database because you will lose your data. Simply run 'ant undeploy deploy', excluding '...create_db -Drecreate_db=true import'. That should be the bulk of it. You may want to deploy CollectionSpace and make sure its running properly on the new host server before doing all of this.

If you have anymore questions, let us know. Good luck.

-Yousuf

On Thu, Nov 16, 2017 at 10:29 AM, Elayne Glantzberg <solinox@solinoxenterprises.com> wrote:

I sent out a message last weekend but got no response. I've been working on this all week, and some assistance or guidance would be very helpful. I need to move our tenanted system from one server to a new server, ASAP because the host of the old server is shutting down. The original system was running postgresql-9.3, tomcat 7.0.57, cspace 4.4. The new system is going to be running postgresql-9.5, tomcat 7.0.64, and cspace 4.5. What I'm trying to do right now is upgrade the old system on all three fronts, do a full basic install on the new system, and then rsync the postgres and cspace folders from the old system to the new system. I managed to successfully upgrade the postgres system to 9.5, and verified by relaunching everything and successfully logging in and viewing data. At the moment, I'm not sure what all I should be doing to move the old system from 4.4 to 4.5, there is zero guidance available in the wiki even though it has been updated so that all the paths now point to 4.5.

Am I on the right track at least? Any help would be greatly appreciated.

Thank you,

Elayne Glantzberg

Database Administrator

Aquarian Tabernacle Church

_______________________________________________
Talk mailing list
Talk@lists.collectionspace.org
http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org

--
Yousuf D. Nejati

_______________________________________________
Talk mailing list
Talk@lists.collectionspace.org
http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org

YN
Yousuf Nejati
Fri, Nov 17, 2017 3:04 AM

Take a look at any errors as a result of the ant deploy task.  Take a look
at the services log for any errors. Post anything that seems unusual to the
talk list and we should be able to help you. -Y

p.s. Don't forget to recursively set the ownership of the data directory to
the cspace user.

On Thu, Nov 16, 2017 at 6:34 PM, Elayne Glantzberg <
solinox@solinoxenterprises.com> wrote:

Thank you so much, guys, this was definitely the information I needed!

And yet...I'm stuck again.  Everything looks beautiful until I actually go
to login to the new system, at which point I get an error message saying
the connection to the services API failed.  So close...

Can you help me from this point?  Here's a log of what I've done so far.
All of the data should be on the new system and intact at this point.

- Follow v4.4 installation through psql section, then rsync dump file
and restore
- Continue v4.4 installation through setting up tomcat section, then
rsync apache-tomcat-7.0.57/nuxeo-server/data
- Update environment variables
- Create collectionspace-source directory, then rsync from old server
- Run build and deploy mvn commands, then "ant undeploy deploy" with
no arguments (to preserve existing data)
- start up server "$CSPACE_JEESERVER_HOME/bin/startup.sh"
- Go to website homepage
- Try to login
- Got "Connection to the Services API failed. Service layer may have
failed to start or needs to be restarted."
- tested ":8180/cspace-services/acquisitions" and got a failure
- shut down server
- rerun "ant undeploy deploy" as root from services folder; BUILD
FAILED
- added environment variables to root bash, source
- rerun "ant undeploy deploy" as root from services folder
- start up server -- same error
- shut down server
- rerun all build and deploy commands as root, both mvn and ant --
still failed

Thank you,

Elayne Glantzberg
Database Administrator
Aquarian Tabernacle Church

-------- Original Message --------
Subject: Re: [Talk] Upgrading and migrating to new server
From: Ray Lee rhlee@berkeley.edu
Date: Thu, November 16, 2017 6:09 pm
To: Yousuf Nejati yousufnejati@gmail.com
Cc: Elayne Glantzberg solinox@solinoxenterprises.com, CollectionSpace
Talk List talk@lists.collectionspace.org

Hi Elayne,
I second everything Yousuf said. I usually do this in three steps:

1. Install a fresh copy of CSpace on the new server. Make sure it's
accessible by a browser, and you can save records.
2. Install your customizations, if any. This means transferring over
any customizations you have in the services, application, and ui source
code directories. We store our customizations in GitHub, so I do a git
clone on the new server to install them. After building and deploying, you
should see your customizations on the new server. If you didn't customize
CollectionSpace, skip this.
3. Transfer your data. I usually rsync the nuxeo-server/data directory
to transfer binaries, and then use pg_dump to dump the postgres databases,
and restore them on the new server with pg_restore.

Ray

On Thu, Nov 16, 2017 at 12:42 PM, Yousuf Nejati yousufnejati@gmail.com
wrote:

Hi Elayne,

Since you are pressed for time, I would suggest sticking with v4.4 for
now on the new host server and then upgrading to v4.5 at a later date.
There are different ways to go about this and it varies depending on how
you've implemented your system.  However, my brief suggestions should work
in most cases.

I would create a remote git project repository (Github, Bitbucket,
Gitlab, etc.) for all three layers of CollectionSpace (ui, application, and
services) and store your source code there so that you may recreate it on
the new host server.  I would then shut down your CollectionSpace instance
and preform an all database dump.  Then, I would copy and compress the data
directory that contains your blobs, which is located
at apache-tomcat-7.0.57/nuxeo-server/data.  Both the database dump file
and the compressed data directory can then be copied to your new host
server for the restore. Be sure to also make a copy of the environmental
variables found in your .bashrc or similar so that they can be recreated on
the new host server.

On the new host server follow the CollectionSpace manual installation
instructions for your host server.  This time, instead of cloning the
source code from the CollectionSpace remote code repository, clone your
source code, that you pushed to a remote repository in the last step,
locally.  Add your env variables to the .bashrc of the cspace user on the
new host server.  Restore the database on your new host server with the
database dump.  Decompress and add the copy of the data directory to its
location on the new host server.  Finish the install.  Do not recreate the
database when you run the ant undeploy deploy task after you restored the
database because you will lose your data.  Simply run 'ant undeploy
deploy', excluding '...create_db -Drecreate_db=true import'.  That should
be the bulk of it.  You may want to deploy CollectionSpace and make sure
its running properly on the new host server before doing all of this.

If you have anymore questions, let us know.  Good luck.

-Yousuf

On Thu, Nov 16, 2017 at 10:29 AM, Elayne Glantzberg <
solinox@solinoxenterprises.com> wrote:

I sent out a message last weekend but got no response.  I've been
working on this all week, and some assistance or guidance would be very
helpful.  I need to move our tenanted system from one server to a new
server, ASAP because the host of the old server is shutting down.  The
original system was running postgresql-9.3, tomcat 7.0.57, cspace 4.4. The
new system is going to be running postgresql-9.5, tomcat 7.0.64, and cspace
4.5. What I'm trying to do right now is upgrade the old system on all three
fronts, do a full basic install on the new system, and then rsync the
postgres and cspace folders from the old system to the new system.  I
managed to successfully upgrade the postgres system to 9.5, and verified by
relaunching everything and successfully logging in and viewing data.  At
the moment, I'm not sure what all I should be doing to move the old system
from 4.4 to 4.5, there is zero guidance available in the wiki even though
it has been updated so that all the paths now point to 4.5.

Am I on the right track at least?  Any help would be greatly appreciated.

Thank you,
Elayne Glantzberg
Database Administrator
Aquarian Tabernacle Church


Talk mailing list
Talk@lists.collectionspace.org
http://lists.collectionspace.org/mailman/listinfo/talk_lists
.collectionspace.org

--

Yousuf D. Nejati


Talk mailing list
Talk@lists.collectionspace.org
http://lists.collectionspace.org/mailman/listinfo/talk_lists
.collectionspace.org

--

Yousuf D. Nejati

Take a look at any errors as a result of the ant deploy task. Take a look at the services log for any errors. Post anything that seems unusual to the talk list and we should be able to help you. -Y p.s. Don't forget to recursively set the ownership of the data directory to the cspace user. On Thu, Nov 16, 2017 at 6:34 PM, Elayne Glantzberg < solinox@solinoxenterprises.com> wrote: > Thank you so much, guys, this was definitely the information I needed! > > And yet...I'm stuck again. Everything looks beautiful until I actually go > to login to the new system, at which point I get an error message saying > the connection to the services API failed. So close... > > Can you help me from this point? Here's a log of what I've done so far. > All of the data should be on the new system and intact at this point. > > - Follow v4.4 installation through psql section, then rsync dump file > and restore > - Continue v4.4 installation through setting up tomcat section, then > rsync apache-tomcat-7.0.57/nuxeo-server/data > - Update environment variables > - Create collectionspace-source directory, then rsync from old server > - Run build and deploy mvn commands, then "ant undeploy deploy" with > no arguments (to preserve existing data) > - start up server "$CSPACE_JEESERVER_HOME/bin/startup.sh" > - Go to website homepage > - Try to login > - Got "Connection to the Services API failed. Service layer may have > failed to start or needs to be restarted." > - tested ":8180/cspace-services/acquisitions" and got a failure > - shut down server > - rerun "ant undeploy deploy" as root from services folder; BUILD > FAILED > - added environment variables to root bash, source > - rerun "ant undeploy deploy" as root from services folder > - start up server -- same error > - shut down server > - rerun all build and deploy commands as root, both mvn and ant -- > still failed > > Thank you, > > Elayne Glantzberg > Database Administrator > Aquarian Tabernacle Church > > > -------- Original Message -------- > Subject: Re: [Talk] Upgrading and migrating to new server > From: Ray Lee <rhlee@berkeley.edu> > Date: Thu, November 16, 2017 6:09 pm > To: Yousuf Nejati <yousufnejati@gmail.com> > Cc: Elayne Glantzberg <solinox@solinoxenterprises.com>, CollectionSpace > Talk List <talk@lists.collectionspace.org> > > Hi Elayne, > I second everything Yousuf said. I usually do this in three steps: > > 1. Install a fresh copy of CSpace on the new server. Make sure it's > accessible by a browser, and you can save records. > 2. Install your customizations, if any. This means transferring over > any customizations you have in the services, application, and ui source > code directories. We store our customizations in GitHub, so I do a git > clone on the new server to install them. After building and deploying, you > should see your customizations on the new server. If you didn't customize > CollectionSpace, skip this. > 3. Transfer your data. I usually rsync the nuxeo-server/data directory > to transfer binaries, and then use pg_dump to dump the postgres databases, > and restore them on the new server with pg_restore. > > Ray > > > On Thu, Nov 16, 2017 at 12:42 PM, Yousuf Nejati <yousufnejati@gmail.com> > wrote: > >> Hi Elayne, >> >> Since you are pressed for time, I would suggest sticking with v4.4 for >> now on the new host server and then upgrading to v4.5 at a later date. >> There are different ways to go about this and it varies depending on how >> you've implemented your system. However, my brief suggestions should work >> in most cases. >> >> I would create a remote git project repository (Github, Bitbucket, >> Gitlab, etc.) for all three layers of CollectionSpace (ui, application, and >> services) and store your source code there so that you may recreate it on >> the new host server. I would then shut down your CollectionSpace instance >> and preform an all database dump. Then, I would copy and compress the data >> directory that contains your blobs, which is located >> at apache-tomcat-7.0.57/nuxeo-server/data. Both the database dump file >> and the compressed data directory can then be copied to your new host >> server for the restore. Be sure to also make a copy of the environmental >> variables found in your .bashrc or similar so that they can be recreated on >> the new host server. >> >> On the new host server follow the CollectionSpace manual installation >> instructions for your host server. This time, instead of cloning the >> source code from the CollectionSpace remote code repository, clone your >> source code, that you pushed to a remote repository in the last step, >> locally. Add your env variables to the .bashrc of the cspace user on the >> new host server. Restore the database on your new host server with the >> database dump. Decompress and add the copy of the data directory to its >> location on the new host server. Finish the install. Do not recreate the >> database when you run the ant undeploy deploy task after you restored the >> database because you will lose your data. Simply run 'ant undeploy >> deploy', excluding '...create_db -Drecreate_db=true import'. That should >> be the bulk of it. You may want to deploy CollectionSpace and make sure >> its running properly on the new host server before doing all of this. >> >> If you have anymore questions, let us know. Good luck. >> >> -Yousuf >> >> >> >> >> >> >> On Thu, Nov 16, 2017 at 10:29 AM, Elayne Glantzberg < >> solinox@solinoxenterprises.com> wrote: >> >>> I sent out a message last weekend but got no response. I've been >>> working on this all week, and some assistance or guidance would be very >>> helpful. I need to move our tenanted system from one server to a new >>> server, ASAP because the host of the old server is shutting down. The >>> original system was running postgresql-9.3, tomcat 7.0.57, cspace 4.4. The >>> new system is going to be running postgresql-9.5, tomcat 7.0.64, and cspace >>> 4.5. What I'm trying to do right now is upgrade the old system on all three >>> fronts, do a full basic install on the new system, and then rsync the >>> postgres and cspace folders from the old system to the new system. I >>> managed to successfully upgrade the postgres system to 9.5, and verified by >>> relaunching everything and successfully logging in and viewing data. At >>> the moment, I'm not sure what all I should be doing to move the old system >>> from 4.4 to 4.5, there is zero guidance available in the wiki even though >>> it has been updated so that all the paths now point to 4.5. >>> >>> Am I on the right track at least? Any help would be greatly appreciated. >>> >>> Thank you, >>> Elayne Glantzberg >>> Database Administrator >>> Aquarian Tabernacle Church >>> >>> _______________________________________________ >>> Talk mailing list >>> Talk@lists.collectionspace.org >>> http://lists.collectionspace.org/mailman/listinfo/talk_lists >>> .collectionspace.org >>> >>> >> >> >> -- >> >> *Yousuf D. Nejati* >> >> _______________________________________________ >> Talk mailing list >> Talk@lists.collectionspace.org >> http://lists.collectionspace.org/mailman/listinfo/talk_lists >> .collectionspace.org >> >> > -- *Yousuf D. Nejati*