Closed AshMartian closed 6 years ago
Question--can this be expanded to include copying data from an existing install, if the install is on a single EC2 Instance?
This gets a little tricky, since the script would need to SSH/SCP into the instance.
My recommendation would be to create a new EFS volume, this serving as your backup/restore point if you needed to re-create the cloudFormation template. Use the instructions here to mount the new EFS volume to your EC2 instance, and rsync/cp the data there first. Then supply that EFS System ID in your cloudFormation template.
Thank you... appreciate the creative thinking.
Quick follow up re if the template has already been run--since I have a new EFS volume up and mounted within this WP RefArch; would I be able to mount this new EFS volume to my existing EC2 instance, and then resync/cp so this new WP RefArch would then have the contents of my original site?
Yes actually that is the only way this was possible before, that's how I was able to get my existing site to the WP RefArch environment. Don't forget to modify your EFS security groups too so since the RefArch will create very restricted groups. Prior you'd also have to mysqldump and mysql import your original database too into RDS (Which has it's own slew of steps to get Security groups and mysql options correct). Here you can provide a cluster snapshot, which doesn't help if you aren't using RDS clusters already.
Thank you for your recommendations--will definitely give it a go!
I have had bad latency issues with each attempt to use this RefArch, and can't help but wonder, if my prior migration attempts (via WP plugins) are introducing issues. Many many hours with AWS techs and we cannot determine root cause of the latency. So, I'm excited to try your Recommendation...
No problem! The issues I've had with latency have been from w3-total-cache. Unless memcached is setup and working, it will spin endlessly waiting for EFS using disk cache. Memcached currently is not working in the RefArch, I know the issue and should have it working soon.
Copy Data from existing EFS volume, and/or restore RDS cluster from existing cluster snapshot.
This has not been tested extensively, but seems to work. I will do more testing next week.