Tutorial: How to Restore Access Server Configuration on Docker
Overview
Use this tutorial to restore or load an Access Server configuration on a Docker container using backup files. You can use this method to recover an Access Server or migrate to a new Access Server installation on Docker.
If you're not running Access Server on Docker, refer to Tutorial: How to Recover a Server with SQLite3 Dump Backup Files.
An installed Access Server where you'll restore the backup configuration.
Docker Linux host console access and the ability to get root access.
While creating backups can be done with Access Server up and running, restoring a backup to a new installation of Access Server on Docker must be done with the Access Server container instance turned off. We assume you have an Access Server installation to which you wish to restore a backup set. Our instructions on restoring a backup include steps to stop the Access Server container instance, restore the backup set, and start the Access Server container instance again.
Sign in to the Docker Linux host console and get root privileges.
Run these commands to stop the Access Server container image, restore the backup, and then start the Access Server container image:
docker stop openvpn-as which apt > /dev/null 2>&1 && apt -y install sqlite3 which yum > /dev/null 2>&1 && yum -y install sqlite cd /<data_folder>/etc/db [ -e ../../config.db.bak ]&&(rm -f config.db;sqlite3<../../config.db.bak config.db) [ -e ../../certs.db.bak ]&&(rm -f certs.db;sqlite3 <../../certs.db.bak certs.db) [ -e ../../userprop.db.bak ]&&(rm -f userprop.db;sqlite3 <../../userprop.db.bak userprop.db) [ -e ../../log.db.bak ]&&(rm -f log.db;sqlite3 <../../log.db.bak log.db) [ -e ../../config_local.db.bak ]&&(rm -f config_local.db;sqlite3 <../../config_local.db.bak config_local.db) [ -e ../../cluster.db.bak ]&&(rm -f cluster.db;sqlite3 <../../cluster.db.bak cluster.db) [ -e ../../notification.db.bak ]&&(rm -f notification.db;sqlite3 <../../notification.db.bak notification.db) [ -e ../../as.conf.bak ]&&cp ../../as.conf.bak ../as.conf chmod 0600 /<data_folder>/etc/db/*.db chmod 0600 /<data_folder>/etc/as.conf docker start openvpn-asThese commands restore the configuration backup on your new Access Server running in Docker.
If you use PAM authentication, the passwords are stored in the operating system. They will not be backed up in the configuration files from step one.
If you encounter errors when attempting to transfer the files using WinSCP, it may be due to insufficient privileges. Connect using SCP and choose “sudo su -” from the Shell field.
If you use Access Server's clustering function, your data is stored separately in a MySQL-type database. Rather than following the above steps for backing up and restoring database configurations, you will simply set up a new server, add it to the cluster, and then remove the old node from the cluster.