[Solved] Migrate Unimus from RHEL to Winbloze

General discussion of anything Unimus
Post Reply
rustyjarz
Posts: 17
Joined: Mon Aug 03, 2020 7:04 am

Thu Mar 25, 2021 10:40 pm

Hi,

I've been given the task to migrate the entire Unimus config, configured devices, backups et al from RHEL to Windows. I noticed there was something in this forum for migrating the other way (Windows to Linux) but I couldn't see migrating from Linux to Windows.

Is this possible, if so could I get some tips please?

Thanks.
rustyjarz
Posts: 17
Joined: Mon Aug 03, 2020 7:04 am

Mon Mar 29, 2021 9:56 pm

Seriously, no one not even Unimus themselves know anything about migrating from one platform to another!
rustyjarz wrote:
Thu Mar 25, 2021 10:40 pm
Hi,

I've been given the task to migrate the entire Unimus config, configured devices, backups et al from RHEL to Windows. I noticed there was something in this forum for migrating the other way (Windows to Linux) but I couldn't see migrating from Linux to Windows.

Is this possible, if so could I get some tips please?

Thanks.
User avatar
Tomas
Posts: 1206
Joined: Sat Jun 25, 2016 12:33 pm

Mon Mar 29, 2021 10:18 pm

Apologies for the late reply.

As you noted, the process is exactly the same as the one already described in the forums for the migration from Windows onto Linux, just reversed: viewtopic.php?f=7&t=334

In this case (assuming use of HSQL):
On Linux:

Code: Select all

systemctl stop unimus
copy "/etc/unimus/unimus.properties" to Windows server
copy "/etc/unimus/hsql" to Windows server
On new Windows:

Code: Select all

Install Unimus using our installer
stop Unimus service
move the properties file into "C:\ProgramData\Unimus"
move the DB ("hsql" directory) into "C:\ProgramData\Unimus"
in "unimus.properties" change "database.path" value to "C:\\ProgramData\\Unimus\\hsql\\db"
restart Unimus service
Everything should work after that.
rustyjarz
Posts: 17
Joined: Mon Aug 03, 2020 7:04 am

Thu Apr 01, 2021 2:27 am

Excellent thanks for the update, I do have one problem however. I don't have hsql in /etc/unimus and I'm not sure where it may live (I didn't build this either so I don't have that inside info).

[*********@******* unimus]$ ls -al
total 16
drwxr-xr-x. 2 root root 31 Aug 27 2018 .
drwxr-xr-x. 102 root root 8192 Mar 17 09:39 ..
-rw-r--r--. 1 root root 1136 Mar 17 09:19 unimus.properties

Checking the .properties file I noted the below . . .

# Database type, valid values are MYSQL, POSTGRESQL, or HSQL
database.type =POSTGRESQL
# Specify the file system directory path, relevant only for HSQL database
database.path =
# Database host, relevant only for MYSQL and POSTGRESQL databases
database.host =127.0.0.1


Tomas wrote:
Mon Mar 29, 2021 10:18 pm
Apologies for the late reply.

As you noted, the process is exactly the same as the one already described in the forums for the migration from Windows onto Linux, just reversed: viewtopic.php?f=7&t=334

In this case (assuming use of HSQL):
On Linux:

Code: Select all

systemctl stop unimus
copy "/etc/unimus/unimus.properties" to Windows server
copy "/etc/unimus/hsql" to Windows server
On new Windows:

Code: Select all

Install Unimus using our installer
stop Unimus service
move the properties file into "C:\ProgramData\Unimus"
move the DB ("hsql" directory) into "C:\ProgramData\Unimus"
in "unimus.properties" change "database.path" value to "C:\\ProgramData\\Unimus\\hsql\\db"
restart Unimus service
Everything should work after that.
User avatar
Tomas
Posts: 1206
Joined: Sat Jun 25, 2016 12:33 pm

Fri Apr 02, 2021 4:12 pm

According to your configuration file, your deploy uses a PostgreSQL database on "localhost" on the Linux machine.

You will need to migrate Postgre to your Windows server. Since you are using an external database and not HSQL, no need to copy the "hsql" directory. There will also be no need to modify the config file if the DB will stay on "localhost" (the new Windows server).

After migrating Postgre, you should be able to start everything and everything should work.
rustyjarz
Posts: 17
Joined: Mon Aug 03, 2020 7:04 am

Tue Apr 06, 2021 12:00 am

Thanks, do you have any guidance on PostGre migration?
Tomas wrote:
Fri Apr 02, 2021 4:12 pm
According to your configuration file, your deploy uses a PostgreSQL database on "localhost" on the Linux machine.

You will need to migrate Postgre to your Windows server. Since you are using an external database and not HSQL, no need to copy the "hsql" directory. There will also be no need to modify the config file if the DB will stay on "localhost" (the new Windows server).

After migrating Postgre, you should be able to start everything and everything should work.
User avatar
Tomas
Posts: 1206
Joined: Sat Jun 25, 2016 12:33 pm

Wed Apr 07, 2021 12:22 am

rustyjarz wrote:
Tue Apr 06, 2021 12:00 am
Thanks, do you have any guidance on PostGre migration?
Sorry, we don't have any guides / info on a Linux -> Windows migration process for PostgreSQL. It would be best to go directly to Postgre documentation for that :)
rustyjarz
Posts: 17
Joined: Mon Aug 03, 2020 7:04 am

Sun Apr 25, 2021 11:39 pm

Hi, Managed to migrate the DB to the new server, updated the unimus.properties files, but when I start unius and connect to the management page I get the Failed to start Unimus and it fails at Connecting to the database with the log entries below.

2021-04-26 08:55:15.728 ERROR 6464 --- [SimpleAsyncTaskExecutor-1] n.u.s.b.b.step.DatabaseConnectionCheck : Database 'PostgreSQLConfig{host='127.0.0.1', port='5432', databaseName='*****', user='******'}' connection test failed. Reason = 'org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.postgresql.util.PSQLException: The authentication type 10 is not supported. Check that you have configured the pg_hba.conf file to include the client's IP address or subnet, and that it is using an authentication scheme supported by the driver.'

Thanks in advance.

EDIT

A couple of idea's.

1. Is it possible to import a backed up DB from PostGe into the native DB?
2. Is there documentation on upgrading the PostGres SQL Server to a newer version as on a closer look I think there's an incompatibility between versions I'm using (current production is v9.2.24 and target is v13.x).
3. PostGres 9.2.24 is no longer supported and the lowest available version I could possibly install is 9.3.25.

Tomas wrote:
Wed Apr 07, 2021 12:22 am
rustyjarz wrote:
Tue Apr 06, 2021 12:00 am
Thanks, do you have any guidance on PostGre migration?
Sorry, we don't have any guides / info on a Linux -> Windows migration process for PostgreSQL. It would be best to go directly to Postgre documentation for that :)
User avatar
Tomas
Posts: 1206
Joined: Sat Jun 25, 2016 12:33 pm

Mon Apr 26, 2021 8:45 am

rustyjarz wrote:
Sun Apr 25, 2021 11:39 pm
2021-04-26 08:55:15.728 ERROR 6464 --- [SimpleAsyncTaskExecutor-1] n.u.s.b.b.step.DatabaseConnectionCheck : Database 'PostgreSQLConfig{host='127.0.0.1', port='5432', databaseName='*****', user='******'}' connection test failed. Reason = 'org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.postgresql.util.PSQLException: The authentication type 10 is not supported. Check that you have configured the pg_hba.conf file to include the client's IP address or subnet, and that it is using an authentication scheme supported by the driver.'
Unimus currently supports Postgre 8-11, so the issue will definitely be in the Postgre versions. You can try to deploy latest v9, or latest v11 and everything should work.
rustyjarz wrote:
Sun Apr 25, 2021 11:39 pm
2. Is there documentation on upgrading the PostGres SQL Server to a newer version as on a closer look I think there's an incompatibility between versions I'm using (current production is v9.2.24 and target is v13.x).
Apologies, as I mentioned, we don't maintain any documentation for Postgre itself - as you can imagine, it would be impossible for us to document all DB engines we support and all their versions. You will need to check the original documentation from Postgre.
rustyjarz
Posts: 17
Joined: Mon Aug 03, 2020 7:04 am

Mon Apr 26, 2021 10:36 pm

Thanks for your help, have migrated the Unimus install to the new server. Had to use an older version of PostGres SQL DB, now will run in parallel for a few days before completely cutting over.
Tomas wrote:
Mon Apr 26, 2021 8:45 am
rustyjarz wrote:
Sun Apr 25, 2021 11:39 pm
2021-04-26 08:55:15.728 ERROR 6464 --- [SimpleAsyncTaskExecutor-1] n.u.s.b.b.step.DatabaseConnectionCheck : Database 'PostgreSQLConfig{host='127.0.0.1', port='5432', databaseName='*****', user='******'}' connection test failed. Reason = 'org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.postgresql.util.PSQLException: The authentication type 10 is not supported. Check that you have configured the pg_hba.conf file to include the client's IP address or subnet, and that it is using an authentication scheme supported by the driver.'
Unimus currently supports Postgre 8-11, so the issue will definitely be in the Postgre versions. You can try to deploy latest v9, or latest v11 and everything should work.
rustyjarz wrote:
Sun Apr 25, 2021 11:39 pm
2. Is there documentation on upgrading the PostGres SQL Server to a newer version as on a closer look I think there's an incompatibility between versions I'm using (current production is v9.2.24 and target is v13.x).
Apologies, as I mentioned, we don't maintain any documentation for Postgre itself - as you can imagine, it would be impossible for us to document all DB engines we support and all their versions. You will need to check the original documentation from Postgre.
Post Reply