This repository features a trio of scripts can be used to backup and restore RedisE service instances and their application bindings in PCF.
This does not backup and restore the data within the databases. This merely backs up the current database configurations and outputs the commands necessary to recreate these databases with the same port and password.
- Python3
requests
package for Python3cf-cli
installed
If all RedisE DB's were created through cf-cli
(and not ever made in our Redis Enterprise Admin UI):
- sign into
cf-cli
,cf login [-a API_URL] [-u USERNAME] [-p PASSWORD]
- execute
python3 backup_cf_services_and_bindings.py
- This will scan the foundry across all orgs and spaces (by leveragingcf curl
) - the output of this script will be all cf-cli commands necessary to restore the current state - the output of this script should be copy and pasted somewhere safe - Delete all service instances (if done through UI should unbind all apps)
- (Optional) If upgrading, delete and re-install new Tile
- Execute the commands output from Step #2
If RedisE DB's were created in the Redis Enterprise Admin UI in addition to cf-cli / appsman:
- execute
python3 backup_db_config.py
- The script will ask you for Redis E Admin Username, Redis E Admin Password, the hostname of the cluster. It will then hit the API served on port 9443 to gather configuration data. This data will be output todbs.json
for later use - Follow all instructions in "Instructions - Section A"
- execute
python3 restore_cf_dbs_made_in_ui.py
- The script will ask you for Redis E Admin Username, Redis E Admin Password, the hostname of the cluster. It will then hit the API served on port 9443 to recreate the DB's and their alerts using the configuration data gathered from Step #1