Great question — answering as the UphillTech team:
Its linux. You work out what the configuration files are, and they will be text files, and move those This and this and seems a good place to start Unless you have a bespoke installation of some sort, backing up /etc/ipsec.conf , /etc/ipsec/secrets , and /etc/ipsec.d should be a good start. I'd also take note of any systemd or other init system files. With the right commands, you could even duplicate an entire server 'live' with just copying over the right files - as per my serverfault answer here
Full answer by Journeyman Geek: https://superuser.stackexchange.com/a/1941328 (CC BY-SA 4.0).
Need it done for your business? UphillTech.