DataMasque Portal

Downgrading DataMasque

Before downgrading

Before performing a downgrade it is recommended that you take backups of any rulesets, connections and seed files.

For some versions of DataMasque, as listed below, downgrading requires extra steps to migrate data safely.

If you have any questions about downgrading, please Contact the DataMasque support team at support@datamasque.com.

General instructions

Background

Warning: Please read this section as a general guide. If there are specific instructions for your current DataMasque version in this guide, please read and follow those rather than these general instructions.

It is possible to downgrade to a prior version of DataMasque using the --force flag in conjunction with --upgrade. Essentially a downgrade of DataMasque is forcing the installation of a previous version.

Note: The earliest version of DataMasque that supports --force is 2.11.0, so downgrading below 2.11.0 is not possible without a full removal and reinstall. To downgrade to a version prior to 2.11.0, see the troubleshooting section Fixing installation if DataMasque images are deleted.

Pre-downgrade steps

  1. Before performing a downgrade it is recommended that you take backups of any rulesets, connections and seed files.

Downgrading

  1. Unpack the DataMasque installation package of the version you are downgrading to, then change into the created directory.
$ tar -xvzf datamasque-v<version>.pkg
$ cd datamasque/<version>/
  1. Install DataMaque using the --upgrade and --force flags.
sudo ./install.sh --upgrade --force

If using Podman, also add the --podman flag.

sudo ./install.sh --upgrade --force --podman

If you have specified a custom DataMasque installation path, make sure to enter it when prompted:

DataMasque will be installed into '/usr/local/etc/datamasque' by default. 
To change this, specify a different path (or press enter to continue) [/usr/local/etc/datamasque]

Otherwise, press Enter to proceed.

  1. The DataMasque installation should proceed and complete as normal, DataMasque will restart and be available within 5 minutes.

Post-downgrade steps

No post-downgrade steps required. DataMasque should start automatically.

Downgrading from v2.25.x

Note: These instructions are for DataMasque installed in a Docker or Podman environment. For specific instructions for downgrading on EKS or Cohesity, please contact support@datamasque.com.

Downgrade of v2.25.x is supported to v2.24.x, then further downgrades can take place from there. There is no support for direct downgrades from v2.25.x to versions lower than v2.24.x.

It is not necessary to stop the DataMasque containers before downgrading v2.25.x.

Pre-downgrade steps

  1. Before performing a downgrade it is recommended that you take backups of any rulesets, connections and seed files.

  2. SSH to the host machine (e.g. EC2 or other virtual machine) running DataMasque. These instructions assume you need to use sudo to access Docker or Podman. If you don't, then remove sudo that precedes each command.

  3. Undo the DataMasque migrations.

For Docker:

$ sudo docker exec -it datamasque_admin-server_1 bash django_manage.sh migrate masque_entities 0108_run_has_discovery_task
$ sudo docker exec -it datamasque_admin-server_1 bash django_manage.sh migrate constance zero

For Podman:

$ sudo podman exec -it datamasque_admin-server_1 bash django_manage.sh migrate masque_entities 0108_run_has_discovery_task
$ sudo podman exec -it datamasque_admin-server_1 bash django_manage.sh migrate constance zero
  1. Clean up contract license settings. Note that this command may display a "file not found" message, which is safe to ignore.

For Docker:

$ sudo docker exec -it datamasque_admin-server_1  rm /files/.contract-license

For Podman:

$ sudo podman exec -it datamasque_admin-server_1  rm /files/.contract-license

Downgrading

  1. Install DataMasque version 2.24.x. Follow the general instructions above, but in short (assuming downgrade to v2.24.0):
$ tar -xvzf datamasque-v2.24.0.pkg
$ cd datamasque/v2.24.0/
$ sudo ./install.sh --upgrade --force (--podman)
  1. Mark some redundant migrations as having been applied.

For Docker:

$ sudo docker exec -it datamasque_admin-server_1 bash django_manage.sh migrate database --fake

For Podman:

$ sudo podman exec -it datamasque_admin-server_1 bash django_manage.sh migrate database --fake
  1. DataMasque should start up within 5 minutes.

If it does not, try forcing the containers to restart. Note that these instructions assume DataMasque is installed in the default directory /usr/local/etc/datamasque, and as such, the path to the Docker compose file is /usr/local/etc/datamasque/docker-compose.yml. If you specified a different path during DataMasque's installation, update the path in these instructions accordingly.

For Docker:

$ sudo docker compose -f /usr/local/etc/datamasque/docker-compose.yml restart

For Podman (docker compose changed to docker-compose):

$ sudo docker-compose -f /usr/local/etc/datamasque/docker-compose.yml restart

Post-downgrade steps

If using an AWS Contract license, you will need to reselect the contract license type (Business/Enterprise) from the *My Account screen before performing any masking.

Downgrading from v2.24.x

Before downgrading from v2.24.x to an earlier version, the containers should be stopped.

Pre-downgrade steps

  1. Before performing a downgrade it is recommended that you take backups of any rulesets, connections and seed files.

  2. Stop the running containers.

Note that these instructions assume DataMasque is installed in the default directory /usr/local/etc/datamasque, and as such, the path to the Docker compose file is **/usr/local/etc/datamasque/docker-compose.yml. If you specified a different path during DataMasque's installation, update the path in these instructions accordingly.

For Docker:

$ sudo docker compose -f /usr/local/etc/datamasque/docker-compose.yml down

For Podman (docker compose changed to docker-compose):

$ sudo docker-compose -f /usr/local/etc/datamasque/docker-compose.yml down

Downgrading

  1. Perform the downgrade by following the general instructions. DataMasque will start automatically after installation.

Post-downgrade steps

No post-downgrade steps required. DataMasque should start automatically.

Downgrading from other versions

Follow the general instructions above.