Downgrading v2.x
- General instructions
- Downgrading v2.26 through v2.31
- Downgrading from v2.25.x
- Downgrading from v2.24 or earlier
- Restarting containers
- Appendix: Migration reference
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
--forceis 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
- Before performing a downgrade it is recommended that you take backups of any rulesets, connections and seed files.
Downgrading
- 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>/
- Install DataMasque using the
--upgradeand--forceflags.
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.
- 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 v2.26 through v2.31
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.
It is not necessary to stop the DataMasque containers before downgrading these versions. To reach versions older than v2.25.x, downgrade step-by-step through each version.
First, find your current version in the table below:
| Current Version | Migration Command | Target Version |
|---|---|---|
| v2.31.x | None required (skip step 2) | v2.30.x |
| v2.30.x | migrate documentation zero |
v2.29.x |
| v2.29.x | migrate masque_entities 0116 |
v2.28.x |
| v2.28.x | None required (skip step 2) | v2.27.x |
| v2.27.x | migrate masque_entities 0113 |
v2.26.x |
| v2.26.x | migrate masque_entities 0111_custom_constance_reverse |
v2.25.x |
To downgrade multiple versions: Run each migration command from the table in sequence (top to bottom), skipping any None required entries. Then install your final target version.
Then follow these steps:
Back up rulesets, connections, and seed files.
Undo migrations using the command from the table above:
# Docker
$ sudo docker exec -it datamasque_admin-server_1 bash django_manage.sh <MIGRATION_COMMAND>
# Podman
$ sudo podman exec -it datamasque_admin-server_1 bash django_manage.sh <MIGRATION_COMMAND>
- Install the target version:
$ tar -xvzf datamasque-v<TARGET_VERSION>.pkg
$ cd datamasque/v<TARGET_VERSION>/
$ sudo ./install.sh --upgrade --force # add --podman for Podman
- DataMasque should start within 5 minutes. If not, see Restarting containers.
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.
Downgrading from v2.25.x requires additional steps compared to later versions.
Back up rulesets, connections, and seed files.
Undo migrations (two commands required):
# 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
# 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
- Remove contract license file (ignore "file not found"):
# Docker
$ sudo docker exec -it datamasque_admin-server_1 rm /files/.contract-license
# Podman
$ sudo podman exec -it datamasque_admin-server_1 rm /files/.contract-license
- Install v2.24.x:
$ tar -xvzf datamasque-v2.24.0.pkg
$ cd datamasque/v2.24.0/
$ sudo ./install.sh --upgrade --force # add --podman for Podman
- Mark migrations as applied:
# Docker
$ sudo docker exec -it datamasque_admin-server_1 bash django_manage.sh migrate database --fake
# Podman
$ sudo podman exec -it datamasque_admin-server_1 bash django_manage.sh migrate database --fake
DataMasque should start within 5 minutes. If not, see Restarting containers.
If using an AWS Contract license, reselect the license type (Business/Enterprise) from My Account before performing any masking.
Downgrading from v2.24 or earlier
Before downgrading from v2.24.x to an earlier version, the containers must be stopped.
Back up rulesets, connections, and seed files.
Stop the running containers:
Note that these instructions assume DataMasque is installed in the default directory /usr/local/etc/datamasque. If you specified a different path during installation, update the path accordingly.
# Docker
$ sudo docker compose -f /usr/local/etc/datamasque/docker-compose.yml down
# Podman
$ sudo docker-compose -f /usr/local/etc/datamasque/docker-compose.yml down
- Perform the downgrade by following the general instructions. DataMasque will start automatically after installation.
Restarting containers
If DataMasque doesn't start within 5 minutes, try forcing the containers to restart.
Note that these instructions assume DataMasque is installed in the default directory /usr/local/etc/datamasque. If you specified a different path during installation, update the path accordingly.
# Docker
$ sudo docker compose -f /usr/local/etc/datamasque/docker-compose.yml restart
# Podman
$ sudo docker-compose -f /usr/local/etc/datamasque/docker-compose.yml restart
Appendix: Migration reference
For advanced users or support reference, here are the database migrations that changed between versions:
| Version | Migration App | Migration Target |
|---|---|---|
| v2.31.x | None | N/A |
| v2.30.x | documentation | zero |
| v2.29.x | masque_entities | 0116 |
| v2.28.x | None | N/A |
| v2.27.x | masque_entities | 0113 |
| v2.26.x | masque_entities | 0111customconstance_reverse |
| v2.25.x | masque_entities + constance | 0108runhasdiscoverytask + zero |