The second step of the process continues on the New SKFS server. This step restores the database and gets all the keystores from the existing server on the new SKFS server.
While the new SKFS is being configured, it is necessary to block webservices in the unlikely event that transactions are mistakenly sent into it. Using a text editor (gedit or vi), edit the firewall settings to block port 8181 by adding a comment (#) to the beginning of the line with the rule for port 8181. Once the changes have been saved, restart the firewall
If Domain Name Service (DNS) is not configured, add the following entries to the /etc/hosts file to identify the cluster nodes. Use a text editor such as vi to modify the /etc/hosts file. For the two-node cluster, add the following to the end of the hosts file, substituting the strongkey.com domain name for your own environment:
fidoserver1.strongkey.com fidoserver1
fidoserver2.strongkey.com fidoserver2
Do not execute this command for the IP address of the cluster node on which you are executing the command itself. It is not necessary to open the node's ports on the firewall for itself, since the replication module in SKFS does not need to replicate to itself.
shell> firewall-cmd --permanent --add-rich-rule 'rule family="ipv4" source address='<ip-target-fidoserver>' port port=7001-7003 protocol=tcp accept'
After adding the new rule, restart the firewall:
shell> systemctl restart firewalld
shell> vi /usr/local/strongkey/appliance/etc/appliance-configuration.properties
appliance.cfg.property.serverid=3 (set value to serverID)
appliance.cfg.property.replicate=true (should be set to true)
shell> scp fidoserver1.<domain-name>:/usr/local/strongkey/dbdumps/skfs-newserver.db /usr/local/strongkey/dbdumps
shell> mariadb -u skfsdbuser -p skfs
mysql> truncate SERVERS;
When the dump has finished sourcing, log out of mysql.mysql> source /usr/local/strongkey/dbdumps/skfs-newserver.db
When the dump has finished sourcing, log out of mysql./usr/local/strongkey/skce/etc/skce-configuration.properties
/usr/local/strongkey/skfs/etc/skfs-configuration.properties
shell> scp -r fidoserver1.<domain-name>:/usr/local/strongkey/skfs/keystores /usr/local/strongkey/skfs
shell> sudo systemctl restart payara
shell> cd /usr/local/strongkey/payara6/glassfish/domains/domain1/logs
shell> tail -f server.log
OR
you can use the alias 'tsl'
shell> tsl
shell> zmq
shell> java -jar skfsclient/skfsadminclient.jar P https://<newserver.domain-name>:8181 1 REST PASSWORD fidoadminuser Abcd1234!