How to update dataverse 5.2 to dataverse 5.3 ?
Introduction
[edit]Upgrading from Dataverse version 5.2 to version 5.3 requires several steps, including upgrading the underlying Payara server, updating configurations, deploying the new Dataverse version, and verifying the successful upgrade. This documentation provides a step-by-step guide to perform the upgrade process seamlessly.
Prerequisites
[edit]Before proceeding with the upgrade, ensure the following prerequisites are met:
1. Access to the server: You should have SSH access to the server hosting the Dataverse instance.
2. Admin access to Payara admin panel: Access to the Payara admin panel with admin credentials is necessary to check the current Payara version and perform administrative tasks.
3. Understanding of server management: Familiarity with basic server management tasks, including starting and stopping services, file manipulation, and database configuration, is essential.
4. Database details: Ensure you have the necessary database credentials and connection details required for configuring Dataverse to connect to the database.
Upgrade to Payara 5.2020.6 or higher
[edit]Step 1 : Check the current Payara version by clicking the About button on Payara admin portal with below login details.
Admin Panel Access URL: https://research.paciandev.com:4848/
User name: *******
Password: ********
Step 2 : Current version is Payara 5.2020.2 so we need to upgrade it to Payara 5.2020.6
Download Payara 5.2020.6 and make it a new directory as /usr/local/Payara5-2020-6
We followed 1st Method in the the following reference link: https://docs.payara.fish/community/docs/5.2020.6/documentation/user-guides/upgrade-payara.html
Step 3 : Stop the running domain by using the below command.
# /usr/local/payara/glassfish/bin/asadmin stop-domain
Note: /usr/local/payara - Payara installed the current path in the server.
Step 4 : Run asadmin backup-domain from the existing Payara Server Community installation by using below command.
# /usr/local/payara/glassfish/bin/asadmin backup-domain
Step 5 : Once backup completed the file stored in the backup directory. To check by using the below command.
# ls -al /usr/local/payara/glassfish/domains/domain1/backups/
Step 6 : Once the domain has been backed up, restore the domain to the newly downloaded Payara Server Community installation by running asadmin restore-domain from the bin directory of the new Payara Server Community installation by using below command.
# /usr/local/payara5-2020-6/glassfish/bin/asadmin restore-domain --filename /usr/local/payara/glassfish/domains/domain1/backups/domain1_2021_07_15_v00001.zip --long domain1
Step 7 : Start the domain by using the below command.
# /usr/local/payara5-2020-6/glassfish/bin/asadmin start-domain
Step 8 : Start the Payara new service by using the below command.
# /usr/local/payara5-2020-6/glassfish/bin/asadmin create-service domain1
Note: You can use below commands to stop and start the payara service.
/etc/init.d/payara_domain1 start (or) service payara_domain1 start
/etc/init.d/payara_domain1 stop (or) service payara_domain1 stop
/etc/init.d/payara_domain1 restart (or) service payara_domain1 restart
Step 7 : Payara Logs file location:
/usr/local/payara5-2020-6/glassfish/domains/domain1/logs/server.log
Step 8 : Check the upgraded Payara version by clicking the About button on Payara admin portal with above login details.
Undeploy the previous version.
# /usr/local/payara5-2020-6/bin/asadmin list-applications
# /usr/local/payara5-2020-6/bin/asadmin undeploy dataverse-5.2
Step 9 : Update your database connection.
# /usr/local/payara5-2020-6/glassfish/bin/asadmin create-system-properties "dataverse.db.user=dvnapp"
# /usr/local/payara5-2020-6/glassfish/bin/asadmin create-system-properties "dataverse.db.host=localhost"
# /usr/local/payara5-2020-6/glassfish/bin/asadmin create-system-properties "dataverse.db.port=5432"
# /usr/local/payara5-2020-6/glassfish/bin/asadmin create-system-properties "dataverse.db.name=dvndb"
Note: We logged into postgres on the server and got the db and username details.
Step 10 : Verify that the __TimerPool jdbc-connection-pool is using the H2 database in domain.xml file, as follows (if you have the old Derby version from Glassfish 4, replace it).
<jdbc-connection-pool datasource-classname="org.h2.jdbcx.JdbcDataSource"
name="__TimerPool" res-type="javax.sql.XADataSource"> <property
name="URL"
value="jdbc:h2:${com.sun.aas.instanceRoot}/lib/databases/ejbtimer;AUTO_SERVER=TRUE"></property> </jdbc-connection-pool>
Step 11 : Delete the DB pool.
# /usr/local/payara5-2020-6/bin/asadmin delete-jdbc-connection-pool --cascade=true dvnDbPool
Stop payara, remove the generated and ejbtimer database directories and then restart payara.
# service payara_domain1 stop
# rm -rf /usr/local/payara5-2020-6/glassfish/domains/domain1/generated
# service payara_domain1 start
Deploy the new version.
# /usr/local/payara5-2020-6/bin/asadmin deploy dataverse-5.3
Step 12 : Once deployed successfully you will restart payara.
# service payara_domain1 stop
# service payara_domain1 start
Step 13 : Verify the upgraded Dataverse version.
# /usr/local/payara5-2020-6/bin/asadmin list-applications
Conclusion
[edit]By following the steps outlined in this documentation, you should be able to successfully upgrade your Dataverse instance from version 5.2 to version 5.3. Ensure each step is executed accurately, and verify the upgrade at each stage to ensure a smooth transition. If any issues arise during the upgrade process, refer to Payara and Dataverse documentation or seek assistance from relevant support channels.