amazon web services - How do I set an elasticache redis cluster as a slave? -
according elasticache manual, slaveof command restricted aws cache nodes.
is there anyway set existing elasticache node slave can migrate existing redis cluster on aws?
as you've spotted, elasticache doesn't support slaveof command can't add elasticache node existing cluster , promote primary node/switch off existing cluster.
instead, migrate redis cluster should create snapshot using either bgsave
or save
produce .rdb
snapshot file.
you should upload snapshot file s3 , allow elasticache access file:
to grant elasticache read access snapshot copied amazon s3
sign in aws management console , open amazon s3 console @ https://console.aws.amazon.com/s3/.
click buckets, , click name of amazon s3 bucket contains .rdb file.
click name of folder contains .rdb file.
click name of .rdb file, click actions drop-down menu, , select properties.
click permissions, , click add more permissions.
in grantee box, type email address: aws-scs-s3-readonly@amazon.com.
important following regions, connect region specific canonical id rather aws-scs-s3-readonly@amazon.com: china (beijing) region: b14d6a125bdf69854ed8ef2e71d8a20b7c490f252229b806e514966e490b8d83 eu (frankfurt) region: 540804c33a284a299d2547575ce1010f2312ef3da9b3a053c8bc45bf233e4353 aws govcloud (us) region: 40fa568277ad703bd160f66ae4f83fc9dfdfd06c2f1b5060ca22442ac3ef8be6 note snapshot must located in govcloud s3 bucket download govcloud redis cluster. note aws-scs-s3-readonly@amazon.com account used exclusively customers uploading redis snapshot data amazon s3.
- click open/download, , click save.
after this, create new redis backed elasticache cluster , in configuration section should specify s3 location of snapshot file.
this seed new elasticache cluster existing cluster's data taken snapshot still have deal either downtime, data loss or have work out way replay aof log elasticache cluster using aof-replay tool.
amazon's docs go more detail here.
Comments
Post a Comment