UNMS - How to Back Up UNMS

 Overview


In this article we describe how to back up or migrate UNMS application data.

Table of Contents


  1. Introduction
  2. How to Backup UNMS Application Data
  3. Related Articles

Introduction


Back to Top

Backing up your data is always a good idea, but it is especially important in certain scenarios. For example, if you will be migrating UNMS to a different server; or if you want to try out different features or configurations on UNMS. Performing a back up first is a best practice that allows you to experiment without the danger of losing the settings you are already comfortable with.


How to Backup UNMS Application Data


Back to Top

UNMS data is stored in /home/unms/data on the Docker host, this includes settings, logs, statistics, images, backups, and SSL certificates.

Database Backup - Settings, Logs, and Statistics

Note that backing up or migrating the databases can be done from within the UNMS app. This may be easier for most users. See Settings > Maintenance > Backup. This tool allows users to back up and restore the database instead of moving the /home/unms/data folder.

How to Back Up the UNMS Data Folder

For data backup, you must first pause the running containers. Go to the directory, where your docker-compose.yml is located (probably /home/unms). Then archive the data and save it somewhere safe. As the final step, unpause the containers.

# go to your UNMS home directory
cd /home/unms

#stop docker containers
sudo /home/unms/app/unms-cli stop

# pack the data directory
sudo tar -cvjSf unms-data.tar.bz2 data

# start docker containers
sudo /home/unms/app/unms-cli start

This set of commands will create an archive for all UNMS settings and data. Then you can move it to another machine or archive.


How to restore UNMS


Back to Top

In the UNMS user interface go to Settings > Maintenance > Restore and click on the 'Choose file' button. Then select the backup profile you created before.

In case you do not have access to GUI you can apply the backup from the command line. Please note you will need to have the 'unms-data.tar.bz2' from the example above.

# go to your UNMS home directory
cd /home/unms

#stop docker containers
sudo /home/unms/app/unms-cli stop

#rename the current data folder
sudo mv data data_old

#create the empty data folder
sudo mkdir data

# extraxt the data directory
sudo tar -xvjSf unms-data.tar.bz2 data

# start docker containers
sudo /home/unms/app/unms-cli start

Related Articles


Back to Top

UNMS - Install guide

We're sorry to hear that!