Synology Backup in Google Cloud Storage Archives

September 26, 2024

I own a Synology DS223j with two Seagate IronWolf 4TB HDDs. I use the NAS as the backup destination for my Macbook's Time Machine. I also store photos on the device, making it convenient for me to share media with friends and family while keeping control of my data.

I run the two HDDs in RAID 1 for redundancy, which should prevent data loss in case one disk fails. But if there's a fire, having data on two disks won't be enough. Storing backups outside my apartment is necessary, and the Synology NAS offers good integration for various remote storage options.

Choosing a Storage Provider

There is a wide range of storage providers to choose from. To narrow down the options, I decided to select providers that meet the following requirements:

  • Privacy: Data should be stored in the EU, and I want strong encryption for my data.
  • Reliability: The provider should have a proven track record of not losing data.
  • Familiarity: Ideally, I'd prefer a provider to uses technology I'm already familiar with.
  • Affordability: Storage should be reasonably priced.

For the cost comparison below, I'm assuming 2TB of data is stored in Frankfurt/Germany.

Service Cost per GB per Month (USD)
Synology C2 0.0600
AWS S3 (Standard) 0.0230
GCS (Standard) 0.0230
GCS (Nearline) 0.0130
GCS (Archive) 0.0025

I was happy to see that Google Cloud Storage (GCS) was reasonably priced. I've been working with GCP for almost half a decade and really like their offerings. GCP also uses default encryption at rest and allows me store my data in Germany. The price difference depending on the GCS storage class is significant: Storing 2TB of backups in the Standard Storage Class costs $46 per month, while using the Archive Storage Class costs only $5.

Using a Google Cloud Storage Archive to Backup a Synology NAS

I set up GCS using a Connection in Cloud Sync (refer tothis guide for detailed instructions). However, Cloud Sync doesn't allow configuring the cheapest GCS Archive storage class directly. There's an easy workaround by setting a lifecycle rule though:

  1. Create a bucket in GCS, e.g. my-synology-backup.
  2. Open the GCP web interface and click on my-synology-backup to open the Bucket details.
  3. In the Bucket details, click on the LIFECYCLE tab.
  4. In the LIFECYCLE tab, click on ADD A RULE.
  5. In Select an action, click on Set storage class to Archive and press CONTINUE.
  6. In Select object conditions, set a checkmark on the condition Storage class matches and one on Standard.
  7. Press CREATE to create the Lifecycle Rule.

Now I only had to connect Cloud Sync to my-synology-backup and configure the directories I wanted to back up to GCS.

Experiences Using Google Cloud Storage Archives to Store Synology Backups

I've been using GCS Archive Buckets to store my Synology backups since February 2024. Since then, I've payed a total of $23.59 (before tax) for my backups on GCP. Surprisingly, the biggest cost contributor when using the GCS Archive Storage Class isn't storage itself, but rather the operations performed on the bucket.

Class A operations are one order of magnitude more expensive for Archive storage compared to Standard storage. This directly reflects the concept behind storage classes: frequently accessed data is better suited for Standard storage, and the cloud provider will optimise for short retrieval time and fast operations. Infrequently accessed data doesn't require optimised retrieval time and can be stored more efficiently, making operations cheaper for the cloud provider and eventually for the customer.

The reason for the the relatively high cost of operations is Time Machine. The software generates 125MB "bands", files that contain the data Time Machine requires to function. These bands seem to be heavily modified by Time Machine: this morning alone, 779 out of 3796 bands were modified on my NAS. Since Cloud Sync synchronizes each file individually, thousands of operations occur over a month.

Cost of operating backups on GCS

The high cost of operations is underlined by the graph below. The blue line represents the total data I store in GCS Archives (currently close to 450GiBs). The orange bars represent the cost per GiB stored. The highest cost per GiB occurred in February when I set up Cloud Sync. This is because every file on my NAS was uploaded to GCS in that month, that's a large number of operations.

On the other hand, the lowest cost per GiB was in August. Since I was traveling abroad for most of August, my Macbook's Time Machine did not store any new bands on my NAS. And Cloud Sync didn't upload any new data to GCS, resulting in the smallest number of operations per month since I set up Cloud Sync.

Cost of operating backups on GCS

Conclusion

I'm satisfied with using GCS Archive Buckets for my NAS backups. The Cloud Sync software works well. However, when initially calculating cost, I underestimated how many files Time Machine modifies daily, leading to higher storage cost than anticipated. Still, the most I've paid is $0.016 per GiB per month, which I think is a great price.

A straightforward way to reduce operations is to disable Cloud Sync from uploading Time Machine bands during specific times. After writing this article, I ended up disabling Cloud Sync from 9Am to 5PM on weekdays. This is a reasonable compromise for me since my Time Machine backups are still available on my NAS at any time.


Profile picture

By Philipp Jung, data engineer and machine learning researcher.