How can I backup and restore the licenses that are stored in the netFIELD App License Server?



Q

How can I backup and restore the licenses that are stored in the netFIELD App License server?



A

The netFIELD App License Server stores any license in the docker volume named 'netfield-app-license-server-data'.

Once you have activated at least one license in the server, it is worth it to create a backup file of this volume to have it ready for cases the volume's content is getting deleted or corrupt.

Standard Docker environment

Backup

If you have deployed the 'netFIELD App License Server' using the standard Docker environment (docker run .. or compose file.), then ceate a license volume backup as a tar-file with the following command line 

docker run --rm -v "netfield-app-license-server-data:/data" -v "${PWD}:/backup-dir" busybox tar cvzf /backup-dir/netfield-app-license-server-data.tar.gz /data

Restore

To restore the volume's content from a backup file call:

docker run --rm -v "netfield-app-license-server-data:/data" -v "${PWD}:/backup-dir" busybox sh -c "rm -rf /data/{*,.*}; cd /data && tar xvzf /backup-dir/netfield-app-license-server-data.tar.gz --strip 1"

Iotedge Docker environment

Backup

If you have deployed the 'netFIELD App License Server' across the netfield.io cloud platform, then create a license volume backup as a tar-file with the following command line:

docker-iotedge run --rm -v "netfield-app-license-server-data:/data" -v "${PWD}:/backup-dir" busybox tar cvzf /backup-dir/netfield-app-license-server-data.tar.gz /data

Restore

To restore the volume's content from a backup file call:

docker-iotedge run --rm -v "netfield-app-license-server-data:/data" -v "${PWD}:/backup-dir" busybox sh -c "rm -rf /data/{*,.*}; cd /data && tar xvzf /backup-dir/netfield-app-license-server-data.tar.gz --strip 1"