Backup Cloud Exchange
Backup Cloud Exchange
To save the configuration present in the Cloud Exchange (like plugin configurations, tenant configurations, v2 token, tenant name, and tenant URL, plus Threat IOCs, settings like enabled CE modules, module specific configurations, and Netskope CE users), backup the data that is in each module (IoCs in Threat Exchange, tickets info in Ticket Orchestrator, actions taken in Risk Exchange, etc.), and then perform these steps.
On the Current System
$ sudo ./stop
- Take a backup for the
.env
file that is available insideta_cloud_exchange
(the command to check for the filels -a
).For this step, you can use a text editor (vi or nano) to copy and paste the contents onto your computer. You will need to reference it during the restore.
- Take a backup of the
ta_cloud_exchange/data
folder.Run the following command from the
netskope
folder:$ mv ta_cloud_exchange/data data_BKP
Run the following commands from the ta_cloud_exchange
folder.
On the New System
Run the following commands.
$ mkdir netskope
$ cd netskope
$ git clone GitHub - netskopeoss/ta_cloud_exchange
$ cd ta_cloud_exchange
- Replace the existing data folder with the backup you took:
$ sudo cp -rT data_BKP ta_cloud_exchange/data
- Place the backup data folder that you created here.
- Run the setup script:
$ Python3 ./setup
. - Compare the
.env
file with the backup file you created. - Run the start script:
$ ./start
. - Run this command to check that all containers are up.
$ docker-compose ps
Restoring to the Current System
If you are loading a fresh install of Cloud Exchange on the same system that you already had it running on, you can follow these steps to restore your data to this fresh install.
First follow the “On the Current System” backup instructions above.
Run the following commands from the ta_cloud_exchange folder to stop docker and remove CE:
docker-compose stop docker-compose rm cd .. rm -rf ta_cloud_exchange/
Install the new version of Cloud Exchange:
git clone https://github.com/netskopeoss/ta_cloud_exchange
cd ta_cloud_exchange
Copy data from the Cloud Exchange backup to Cloud Exchange:
$ sudo cp -rT data_BKP ta_cloud_exchange/data
From the ta_cloud_exchange folder Run
$ python3 ./setup.
Note: during the setup you will be asked for your JWT and maintenance password. These passwords are shown in your .env backup that you took from the current system above. Since you are using the same db as before, it must match the passwords used before.
Compare the .env file with the backup file you created.
Run ./start.
Run
$ docker-compose ps
to check that all containers are up.