Documentation ¶
Overview ¶
The `redis-broker` plugin for SHIELD implements backup + restore functionality for Piovtal's cf-redis-release (Redis Service + Broker for CloudFoundry). It is specific to Pivotal's implementation, which can be found at https://github.com/pivotal-cf/cf-redis-release
It is unlikely that this plugin will work with other Redis instances.
PLUGIN FEATURES ¶
This plugin implements functionality suitable for use with the following SHIELD Job components:
Target: yes Store: no
PLUGIN CONFIGURATION ¶
The endpoint configuration passed to this plugin is used to identify what type of redis VM to back up. Your endpoint JSON should look something like this:
{ "redis_type":<dedicated|shared>" }
Default Configuration
{}
BACKUP DETAILS ¶
The `redis-broker` plugin backs up all data in `/var/vcap/store`, to grab all of the redis data, whether it is a dedicated-vm, or shared-vm instance. Redis data for this BOSH release is stored in the appendonly.aof file, and written to every second.
RESTORE DETAILS ¶
Restoration steps for the `redis-broker` plugin depend on the type of redis being backed up.
If `redis_type` is set to `shared`, the restoration stops the redis service-broker process, kills all instances of `redis-server`, and untars the backup into /var/vcap/store. Once complete, it runs `redis-check-aof --fix` against all appendonly.aof files, to resolve any potential corruption caused by backups happening mid-write. Lastly, it starts up the redis service-broker process, which in turn spawns all of the redis-server's to be running on this shared-vm.
If `redis_type_ is set to `dedicated`, the restoration stops the redis-server and redis-agent process, untars the backup into /var/vcap/store, runs `redis-check-aof --fix` against any appendonly.aof files, to resolve any potential corruption caused by backups happening mid-write. Lastly, it starts up the redis-server and redis-agent processes.
Restores with the `redis-broker` plugin are service-impacting, as the redis-servers are shut down for the duration of the restore. Additionally, the redis-agent and CloudFoundry service broker processes are disabled, to prevent creation of new services of either shared-vm or dedicated-vm plans during the restore.
DEPENDENCIES ¶
None.