Page 1 of 1

Restoring a server's backup configuration

Posted: Mon May 17, 2021 8:28 pm
by ctrl1122
I am currently in the process of migrating our OpenVPN configuration and am following these instructions: https://openvpn.net/vpn-server-resource ... ess-server . Will restoring the configuration on the new server overwrite it's current network settings (IP assignment, CARP settings) ? I am looking to just do a quick IP swap in the firewall to point to our new machine while still leaving the old server functional.

Re: Restoring a server's backup configuration

Posted: Tue May 18, 2021 8:55 pm
by chilinux
You should be able to use the following script to modify the IP addresses before starting the restored server:

Code: Select all

/usr/local/openvpn_as/scripts/confdba
Unlike sacli, the OpenVPN AS does not need to be running to use confdba so you can use it before starting the AS service.

I found the easiest way to go through all the values is to dump it all to a json files:

Code: Select all

/usr/local/openvpn_as/scripts/confdba --db sqlite:////usr/local/openvpn_as/etc/db/config.db --save -f /root/config.json
/usr/local/openvpn_as/scripts/confdba --db sqlite:////usr/local/openvpn_as/etc/db/config_local.db --save -f /root/config_local.json
Then modify the json files with a text editor and then use --load instead of --save.

It is also modify individual entries instead with --key= and --value=

It should be noted that the uCARP/failover feature requires a license and won't work with the free 2 license version.

If you are using fixed licenses then you will have to buy additional one and get another failover license for the new servers before starting the service.

If you are using subscription licenses then the process should be easier. However, I have run into one issue with uCARP and flex licenses not working completely as documented. The issue was reported to support back in middle of Feb. They started focusing on reproducing the issue in the middle of March. I still have not heard back with a working fix. There are indications it will be fixed in 2.9.0 but no ETA or additional updates have been provided.

Re: Restoring a server's backup configuration

Posted: Tue May 18, 2021 11:23 pm
by ctrl1122
Thank you for these details. I restored the config on the new server. No IPs were changed but it did drop the CARP configuration from the new server so I added that back in. Looks like we're due for a license upgrade as we currently have a fixed license and need a subscription in order for everything to function.