This is a small write up about how to migrate your pritunl install between servers. It's not especially detailed because I'm lazy and your migration story will most likely be different. All this can be avoided by using a remote/hosted mongo instance(compose.io, mongolab, etc.) and simply pointing your pritunl instance at that. If you want more details ask, and I'll do my best to answer and update this write-up accordingly. Also, feel free to criticize my grammar and spelling.
sudo service pritunl stop
mongodump
tar -zcvf dump.tar.gz dump
scp dump.tar.gz user@remote-server:/path/to/save/location
- save the following file on your server
- make it executable
chmod u+x pritunlInstall.sh
- run it
./pritunlInstall.sh
#!/bin/bash
echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.0 multiverse" > /etc/apt/sources.list.d/mongodb-org-3.0.list
echo "deb http://repo.pritunl.com/stable/apt trusty main" > /etc/apt/sources.list.d/pritunl.list
apt-key adv --keyserver hkp://keyserver.ubuntu.com --recv 7F0CEB10
apt-key adv --keyserver hkp://keyserver.ubuntu.com --recv CF8E292A
apt-get --assume-yes update
apt-get --assume-yes upgrade
apt-get --assume-yes install pritunl mongodb-org
service pritunl start
tar -zxvf dump.tar.gz
mongorestore dump
If you block traffic with a firewall you will need to make an exception for
pritunl. The pritunl admin interface is on tcp:443
and each server you setup
will also have a port that you will need to setup rules for. I use
ufw as my firewall so ...
sudo ufw allow https
Go to https://SERVER_IP
and accept the prompt to use the local mongodb
server. Then sign-in with your pritunl username and password from the previous
server. If it all checks out, delete the old server and pat yourself on the
back.