[Solved] Migrate Unimus from RHEL to Winbloze

General discussion of anything Unimus
Post Reply
rustyjarz
Posts: 5
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: 5
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: 965
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: 5
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: 965
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: 5
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: 965
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 :)
Post Reply