Migrating SIPIS to a different server¶
Suppose you want to migrate your SIPIS installation to a different machine. For example because you are switching to a different cloud services provider or because the old machine is showing its age.
Whatever the reason for moving, you start by doing a clean installation of sipis on the new machine.
Now there are several options depending on your situation.
The old SIPIS still works and is fine¶
I do not mind changing SIPIS hostname¶
In this case you should change SIPIS address in the provisioning to the new machine. After the app receives the new provisioning with new SIPIS address, it will unregister from the old SIPIS and registers with the new one. Until that it will still receive pushes from the old SIPIS.
The old SIPIS will keep the registrations until the end users open the app or until the instance on the SIPIS expires. Before expiration, a push is sent to the app so that it can renew its registration with SIPIS.
You can make this process faster by sending NotifyReprovision push notification.
Without changing SIPIS hostname¶
This option is more difficult than the previous one.
So you have a machine with running and working SIPIS and a new machine with clean SIPIS installation.
We will assume that LB2 configuration on the old machine has only one Backend/Sipis
element pointing to 127.0.0.1
and that the database is also on localhost. If you installed your SIPIS
using the installation procedure described in this documentation then your configuration
should be as described here.
First, stop (the clean) SIPIS on the new machine.
systemctl stop sipis
Then replace content of /etc/acrobits and /etc/sipis with the content from the old machine.
Stop the SIPIS on the old machine.
Dump the database on the old machine and load it to the new machine.
Make sure that Database[OpenString]
in /etc/sipis/Settings.xml
on the new machine connects to the new database.
Note
Right now you should have exactly the same /etc/sipis/sipis.key
file on both machines,
and Settings.xml should have the same Server[Name]
.
Change DNS so that your SIPIS domain name points to the new machine.
Start SIPIS on the new machine.
Warning
Make sure that the old SIPIS does not start again. At minimum disable
the old sipis using systemctl disable sipis
, preferably uninstall old SIPIS.
Having two running SIPISes with the same data will cause problems.
In case you have a large TTL for your DNS record, you may want to set up forwarding on your old SIPIS machine.
Forward traffic from old SIPIS¶
After you move your SIPIS to a new machine, apps may still attempt to connect to the old one (usually because your DNS is not updated yet).
You can change configuration of LoadBalancer2 and nginx (or stunnel, depending on what you choose during the installation) on the old machine to forward SIPIS traffic to the new SIPIS machine.
In LB2 configuration on the old machine, change SIPIS address in Backend/Sipis
from 127.0.0.1
to the IP address of the new machine.
For HTTPS: if you use nginx, change IP address in proxy_pass
directive under location /sipis/register
.
If you use stunnel, change IP address on the connect
line.
Warning
Traffic forwarded in this way is not encrypted and may contain sensitive data, even passwords (in HTTP traffic)!
The old SIPIS is down¶
The procedure depends on whether you have access to database backup and file
/etc/sipis/sipis.key
.
I have nothing¶
In this case install a clean SIPIS anywhere. Then set it as SIPIS for your users (put its address in provisioning or change DNS record). When the app opens on the user’s device, it will register with the SIPIS and work as intended. However, until the user opens the app, they will not receive calls. It helps if you can tell your users to open the app (by sending them an email or even push notification, if you have push data from Push Token Reporter).
I have backups¶
The minimal backup that is required is the database and file sipis.key
.
If you do not have either of those proceed as if you did not have any backup.
Otherwise the procedure is similar to moving SIPIS to a different machine without changing the hostname.
Do a clean installation of SIPIS. Make sure SIPIS is not running.
2. Restore the database and restore file /etc/sipis/sipis.key
.
Make sure it is readable by user sipis
3. If you have backup of SIPIS configuration files, restore those into /etc/sipis
and /etc/acrobits
.
If you use TLS, check that you also restore the certificates.
If you do not have configuration files, you will need to set
Server[Name]
attribute in the/etc/sipis/Settings.xml
on the new machine to be the same as on the old one. If you did not change it, it will beSipisOne
. Otherwise you will find it in the database inrestart
table inserver
column.If you used the load balancing on a single machine and do not have the configuration, you will need to recreate it.
4. Make sure that Database[OpenString]
in /etc/sipis/Settings.xml
on the new machine connects to the new database.
Start sipis.
Point DNS records to this new machine.
Again, make sure that you never have two SIPISes handling the same user as this would cause problems.