In AWS-EC2, I was thinking of backup my code data and database in RDS via bash script on separate attached drive on same instance. I want to do it like that way so it becomes easier for me during restore. Is this fine to do it like this or someone has any better suggestion? Also, will this strategy cost me more or S3?(the only reasaon I did not think of S3 is because restore time, not sure if I am right)?
1 Answer
I personally backup my code in S3 using git, using this method: http://www.fancybeans.com/blog/2012/08/24/how-to-use-s3-as-a-private-git-repository/ RDS is already backed-up so I just use the auto-backup feature of RDS for my databases.
-
But for RDS would I not have issues when I have multiple database in same instance and I need to restore only one? Do you find git to post on S3 more easier for backup/restore than to just simply tar on another drive?– FarmiAug 28, 2015 at 11:27
-
1When you restore a backup on RDS, your production machine is untouched. A new RDS instance is launched, where you can log in and extract the data you need and then load it back on to the main instance, or, if something catastrophic happened, you can switch your application to use the new instance and delete the original one. Aug 28, 2015 at 12:09
-
To backup code I find using git way easier than backing-up tars. To backup blobs of data Git is not optimal, so I only use the git backup scheme for code. As mentioned you can restore your RDS instance on a new instance and get the specific database on the new instance. Aug 31, 2015 at 11:06