In this post, I’ll share how you can estimate costs if you backup your AWS environment with EBS snapshots. The three main factors that affect backup costs are: data size, how rapidly data grows (with block level incremental snapshots), and the length of your backup retention period. Although these factors vary, we’ll help you calculate costs with a broad estimation based on a few use cases.
Before calculating costs, let’s take a look at the following scenario: an environment has five EC2 instances, each with an attached EBS volume. Each volume averages out to one terabyte, be it the amount of data that is actually written to the volume, or the size of the volume in general. EBS snapshots solely copy the blocks of the disk that were written to as of the last snapshot, meaning if part of a disk was left unchanged, it won’t be included in the snapshot.
In order to determine the size of each snapshot, let’s first assume that one daily snapshot is taken for each volume within a 30-day span, totaling 30 incremental snapshots for each volume. Then, let’s assume that a typical server updates 3% of its data every day (this is a ballpark estimate for common use cases). The result is 3% of your 1TB of data that changes every day, or 30GB per daily snapshot.
It’s important to consider that the backup process begins with an initial full backup followed by incremental snapshots. A volume’s first full backup is 1TB large, and assuming each following snapshot consists of 3% updates, the subsequent 30 incremental snapshots nearly add up to an additional terabyte. The snapshot’s total size (30-day retention period) for a 1TB volume is then actually 2TB.
In our case:
Additionally, snapshots are compressed which might decrease your snapshot costs, depending on the type of data that’s stored on your disk. Therefore there won’t be much compression if the data contains files like JPEGs or MP3s, but there will be a huge amount of compression with data containing text files.
If you take 1TB of local snapshots every day for one month with 3% daily increment changes and a 30-day retention period, it will cost you the same as snapshots for 2TB per month. With $0.10 per GB-month of snapshots, it will cost around $200 ($0.1/GB x 2TB) per disk. Interestingly enough, the disk cost of a General Purpose SSD is $0.20 per GB. This means that the price of a snapshot ($200) would cost around the same as storage for your EBS volume ($0.20/GB x 1TB). Returning back to our scenario, it would cost $1000 for snapshots every month ($0.10/GB x 2TB = $200 x 5). Finally, if your files can be compressed, you should multiply them by the compression factor.
Note: The cost of EBS snapshots ranges from $0.0095 (US east N.Virginia in May 2015) to $0.13 based on the region. We used $0.1 to simplify the case.
The costs outlined above were calculated for local snapshots that are recovered in your own region. However, if you want to perform a cross region backup and DR, you might want to copy your snapshots to another region. If this is the case, you'll have to keep snapshots in two places, greatly impacting backup costs. For many, this redundancy is worth it if it means data resilience.
Snapshot prices vary between regions. Additionally, transferring data between regions requires WAN copying, which can potentially incur costs. In order to calculate these transfer costs, take the size of your daily snapshot and multiply it by the amount of days per month for each TB of production data you need to copy per month between regions.
Back to our scenario, data transfer to another AWS region costs $0.02 per GB (US East N.Virginia) , totalling up to $100 ($0.02/GB x 1TB x 5). Overall, cross-regional backup costs $2,100.
It is important to calculate the amount of resources you need to efficiently back up your online service. When these costs pile up, remember that losing your data can cost you much more than backup, alone.
This guest post was contributed by Uri Wolloch, Co-Founder and CTO at N2Ws