How to Backup a Synology NAS to Backblaze B2!

  • Post author:WunderTech
  • Post published:June 30, 2020
  • Post last modified:November 17, 2023
  • Post category:Synology
  • Reading time:10 mins read
  • Post comments:35 Comments

This tutorial will take a look at how to backup a Synology NAS to Backblaze B2.

In the last post that I created, we took a look at how to backup your Synology NAS to a Raspberry Pi. I think that for large, non-important data backups (>2-4 TB), using a Raspberry Pi offsite with an external hard drive is a great way to save money and have a similar off-site backup process.

However, I have been a Backblaze B2 customer for a while and think they offer a great service for a reasonable price.

For the data that is incredibly important to me, I have always used Backblaze B2 configured with Synology’s Cloud Sync, but Backblaze recently implemented an Amazon S3 compatible API which is awesome!

This allows us to connect to Backblaze B2 directly from Synology’s Hyper Backup which was never possible! To learn how to backup a Synology NAS to Backblaze B2 using Hyper Backup, follow the instructions below.

Creating a Bucket in Backblaze B2

First, we have to create a bucket in Backblaze that we will write our data to. Select Buckets, then Create a Bucket.

How to Backup a Synology NAS to Backblaze B2!

Give the Bucket a unique name, then select Create a Bucket.

How to Backup a Synology NAS to Backblaze B2!

How to Backup a Synology NAS to Backblaze B2

1. The bucket you created will automatically have an endpoint. We’ll need this for a future step.

test b2 bucket created

2. The next step is to ensure that you have an Application Key that is compatible with the Amazon S3 API. If you don’t have one, you’ll have to create a new application key.

b2 permissions

3. If you need to, create a new Application Key that has permission to your new bucket and ensure that it has an Amazon S3 Endpoint. This is what will ensure that Hyper Backup can connect to the bucket using these credentials.

Make sure that you note down the KeyID and Application Key as we will need this information for Hyper Backup. Also, ensure that “Allow listing all bucket names including bucket creation dates” is checked off. Without this setting, Hyper Backup will be unable to find your bucket.

application key for b2

6. Now that Backblaze B2 is configured, launch DSM and open Hyper Backup. Add a new “backup task” and select “S3 Storage”.

hyper backup s3 storage

7. Under the “S3 Server” select “Custom Server URL”.

8. We need to configure our server information, but before doing so, I want to make an important point. Since we are dealing with a cloud provider, the provisioning is not always immediate. You may have to wait upwards of 10-15 minutes for your Bucket, KeyID, and Application Key to work properly in Hyper Backup. If you receive errors, give it a little more time and try again.

When ready, enter the information as follow:

a. Server address: S3 Address from your Backblaze B2 bucket Endpoint (step three)
b. Signature Version: v4
c. Access Key: KeyID (from Backblaze B2 – step five)
d. Secret Key: Application Key (from Backblaze B2 – step five)
e. Bucket name: Bucket name you created in Backblaze B2.
f. Directory: File name you’d like to use.

custom url settings added

9. Select the shared folders and applications you’d like to backup. At the final step, enter the settings you’d like. When backing up to a cloud provider, it’s always a good idea to use client-side encryption so you know your data is always secure.

synology nas to backblaze b2 schedule

10. If you enabled client-side encryption, you will be warned that you will be unable to retrieve your data if you lose the password or encryption key. Click yes, configure the backup rotation and “Apply”. You should now be prompted to backup your system.

You will also be prompted to download the encryption key if you enabled client-side encryption. Download the key and place it somewhere SECURE! This key can save you!

backup now screen

11. Click “Yes” – the backup will now start!

Hyper Backup Data Restoration

1. Backing up your data is only half the battle – you need to ensure that you can restore the data if it is ever lost. I will be deleting a few files from my test directory and restoring them to ensure the process works.

deleting file to test restoration

2. Select the “Restore” button and select “Data”.

restore data button

3. Pick the task that is backing up to Backblaze B2. Enter the encryption password if prompted.

entering encryption password

4. Navigate through the settings and ensure that you are restoring the correct folder.

NOTE: if the folder exists on the local NAS, the folder will be overwritten with the server version.

navigating backup in hyper backup

5. When finished selecting your configuration, applications, and folders, select “Apply”. This will restore the folder.

task restoration in hyper backup

6. Your folders should now restore. When complete, you should see the deleted files restored! This confirms that the backup/restoration process works as expected.

restore progress
files restored

Conclusion & Final Thoughts

This tutorial took a look at how to backup a Synology NAS to Backblaze B2. I’ve been using Backblaze B2 for a while and the Amazon S3 API integration made it even better. Before this, I was forced to use Synology’s Cloud Sync, which worked well but offered more of a file cloning service rather than a true backup.

In that instance, you were relying on Backblaze’s versioning as a “backup,” as corrupted or encrypted source files would simply sync to Backblaze B2. Hyper Backup is a true backup – and coupled with Backblaze B2 – a great option for important data!

Thanks for checking out the tutorial on how to backup a Synology NAS to Backblaze B2. If you have any questions, leave them in the comments of the YouTube video!

WunderTech

WunderTech is a website that provides tutorials and guides on various NAS, server, networking, and infrastructure-related topics. WunderTech is maintained by Frank Joseph, an IT professional with 14+ years of experience in corporate IT and application management. He focuses on sharing his experience with others on his WunderTech website and YouTube page. Frank holds a Bachelor of Science in Computer Information Systems and a master of Business Administration (MBA).

This Post Has 35 Comments

  1. Brett

    Just to echo others’ comments, this a wonderful tutorial & deeper than anything else I’ve found. Thank you for all the effort!

    I’m a little confused about how version rotations work when using client-side encryption. Since Backblaze can’t read the actual folder/file contents, do we need to let Hyper Backup manage the rotation? If so, what would be the correct configuration on the server side (Bucket: Lifecycle Settings)… “Keep only the last version of the file”?

    1. WunderTech

      Thanks so much! That is correct – you will manage everything from inside of Hyper Backup, then restore from inside of Hyper Backup as well if necessary. The Backblaze versioning can be used to keep the Hyper Backup archive for X number of versions. It’s a little confusing, but if you wanted to restore the Hyper Backup archive from last week inside of Backblaze, you can. It’s kind of like a second layer of versioning if needed.

  2. Julian

    Thank you Frank for sharing your experiences and taking the time to answer all these questions. I already set up Hyper Backup with B2 before reading your post, but it was still nice to see a confirmation that I took the right steps. 🙂

    I started uploading (initial backup still in progress) and I noticed something odd. By way of experiment, I started with a relatively minor selection of shares to backup. According to the storage analyser, it should be about 15 GB. However, Hyper Backups reports having uploaded 74 GB already (B2 confirms this) while being only at 69%, which puts the 100% estimate somewhere around 110 GB. I switched compression on (and client side encryption, but I don’t think that should make a significant difference), which makes this all the more surprising.

    Have you seen similar patterns? Should I be concerned about Hyper Backup inflating the amount of data to backup, or is there some kind of fixed overhead that I’ll be paying for only once? Possibly relevant: one of the shares involved has versioning enabled for Synology Drive, and there is also a share that is being backed up both because I selected it and because it is included with an app that I selected. I would however expect Hyper Backup to handle both cases intelligently.

    Thanks in advance!

    1. WunderTech

      Thanks so much!

      I haven’t seen that behavior before (or I should say, haven’t looked into my backup totals), but I think that you hit the nail on the head that it’s Synology Drive. Whenever you save a file, it will automatically save an identical copy of that file, but with BTRFS and deduplication, it won’t actually utilize that storage space as it’s only saving the differential. It’s not out of the realm of possibility that you have tons of files that add up to a much larger sum without deduplication. While not ideal, the best way to test would most likely be to upload a specific file on a Shared Folder that is an exact total (1GB for example) and see what it uploads. If it only uploads 1GB, then you can most likely rest easy that it’s simply deduplication. If that’s the case, you can then play with the version history totals (keep X amount of files) to try and limit the total upload, but that would technically lower your history on the file as well.

  3. Mike

    So glad I found this article, what a great post! Answered my burning question of whether I could switch from Cloudsync > Backblaze over to Hyperbackup > Backblaze (the answer: no; my bucket didn’t have an endpoint). But no matter, my Backblaze backup was at least two years younger than my Hyperbackups to my onsite and offsite Synology arrays.

    You helped get me set up quickly and easily, and once this finishes I’ll finally be able to get Cloudsync running properly with Google Shared Drive for my team. Thanks a million, I’ll definitely be diving into some of these other articles you’ve written!

    1. WunderTech

      I’m glad to hear that the articled helped! Thanks so much for the kind words!

  4. Etienne

    Thanks 🙂
    Do you know if I set a retention of 5 versions or x days, the data gets deleted when it goes over that but does that count in the number of deleted gb? Or it only counts when you manually delete data in the storage.

    1. WunderTech

      I don’t believe that it will count in the number of deleted data. At least it doesn’t on mine!

  5. Etienne

    Hey,

    Great tutorial 🙂
    For a personal home use NAS that has about 9Tb used, Should I do multiple buckets? Does that impact the cost as well?
    All home computers are backing up to the NAS using the Synology Drive Client, the NAS also serves as a media server. My goal is to have a backup of my NAS in case it gets stolen, the drives fails or any other incident that would lead to the loss of the NAS/Data on it. I do not see much downloads happening, the only time I will need a restore from B2 would be after a disaster and I want to keep my cost as low as possible.
    Is the B2 cloud and the use of Hyper Backup a good solution or should I use Cloud Sync or another cloud storage?
    Thanks 🙂

    1. WunderTech

      Hello! I would say that B2 is a great solution, though not the only solution. I am a fan of Backblaze B2, but that’s a subjective statement so I can only suggest comparing price/performance and determining what you think would be best.

      If you do decide to use Backblaze B2, you are free to create as many buckets as you’d like and there will not be an increased charge. You basically create the bucket, hook it up to Hyper Backup and set up the parameters as you’d like. The only reason you’d use multiple buckets is if you’d like different retention rules/backup schedules. If they will all be the same, one bucket is fine!

      Let me know if you have any other questions!

  6. Jason

    Thanks WunderTech, our NAS volume is total 6TB space, it stores total around 3TB files size as this 3TB size contains a lot of folders and files, but 99% of this files are history files, that means for the daily, I only update around 10 to 100 files, say around 20MB to 60MB daily, for the first time backup, due to the total file size issue, it will take very long time to backup them to the Cloud, for example, few days ago, I tried to backup around 50GB file size, around 1,800 files, company broadband is 100M upload/download speed, it took around 22 hours from NAS to Backblaze B2 Cloud, If one time to backup 3TB with a lot of files, I am afraid it will take few days to complete this task.

    1. WunderTech

      Unfortunately, it is going to take absolutely forever to back up. I haven’t had much luck with Backblaze as far as upload speeds go. It’s not on your side, it’s almost certainly on their side, but once the initial backup is complete, the incremental backups are quick.

      I think that you’re doing everything right and are using the correct tool (Hyper Backup). If there’s anything in specific I can help with, please let me know!

      1. Jason

        Thanks WunderTech

  7. Jason

    Our company uses DS218+ and running Hyper backup for a long time, I just use external USB hard drive as a daily data backup and now I am seeking cloud backup solution, I saw your “Synology NAS Backblaze B2 Hyper Backup Tutorial”, it was great; for the cloud backup solution, I have a question regarding our company data in Synology NAS as the data including tens of thousand folders and files are over 3TB size, is it a good idea to back up to cloud or should I create few buckets from Backblaze to separate this tasks to reduce transmission error? Our company uses 100M/100M broadband internet.

    Thank you in advance.

    1. WunderTech

      Thanks for checking out the tutorial! How big is the total volume that you’ll be backing up? I don’t think it will be much of a difference, but depending on the size/how often the files are accessed, I would consider breaking it up. You shouldn’t have any issues with the 3TB files as Backblaze allows up to 10TB files.

      For example, I have files that I back up to Backblaze that aren’t modified frequently. For these, I have a separate Hyper Backup task that backs them up less frequently than my frequently modified files. It basically just speeds up the process. There really isn’t a right or wrong answer as I don’t think you’ll have any problems, but depending on total size, I’d consider breaking it up. If I can answer any specific questions, please let me know!

  8. Brian

    Does this method still work? I’ve updated my Synology DSM to the latest version and updated Hyper Backup to the latest version. When I get to step 8 I enter all of the required information and click in the Bucket field. It immediately tries to connect to my Backblaze endpoint. After a minute or two a message pops up and says “No response from the destination server. Please check your network status and try again”. So I can’t connect to my Backblaze B2 buckets, which I just created this week. One thing to note is that when I add the application key in Backblaze there is no option for “Allow listing all bucket names including bucket creation dates”. I do see all of the other fields. My DSM version is “6.2.3 – 25426 Update 2” and my Hyper Backup version is “2.2.6 – 1316”. The NAS is a model RS2212RP+.

    1. WunderTech

      It does, but you have to allow the application key permission to that bucket only. A generic key that has access to all buckets won’t work. If you create a new application key and select the bucket you’d like it to have access to, you will then see the “allow listing…” and you should be able to see it from Hyper Backup. If you need anything else, please let me know!

      1. David

        Hello, I am running to the same issue Brian experienced. I have verified that the app key was setup correctly. I am running a DS3018xs with DSM 6.2.3-25426 Update 3 and HyperBackup v 2.2.6-1316. I do also run Cloud Sync to BackBalze and its app key is setup to only allow access to that bucket.

        1. WunderTech

          I apologize for the most likely redundant question, but when you created the app key, did you “Allow List All Bucket Names”?

          1. Max

            Same issue here. I’ve created a key with “Allow List All Bucket Names” but see the same error message as David and Brian.

  9. Mike

    Hi, I’m currently using CloudSync with a schedule which runs at night. When I look at the CloudSync status it shows Suspended. I never know how much has been backed up and what is yet to be backed up. Even if I login to the NAS when it’s running, I can only see how much of the target storage is used, the number of files being backed up and which files are currently being backed up. The history does show which files have been backed up. Does Hyper Backup/Backblaze provide any improvement on that situation? Or do you have another suggestion? Thanks.

    1. WunderTech

      CloudSync stays in the state of “suspended” until that scheduled time comes up and then it syncs. I never liked this, so I changed it to “always” sync (which has its own concerns), but then you will see if all of your files are up-to-date. Unfortunately, outside of the “history” on the CloudSync task, you won’t be able to run any additional reports.

      Hyper Backup doeshave additional reports, but it’s more storage-like reports. Basically telling you how much space on the source and destination is being used. I’m not sure Hyper Backup will help with this and Backblaze definitely won’t. I will be honest in saying that I only look at successes/failures for back up integrity and not individual files. I think that if the system reported as “successful”, you can be confident that the backup was successful.

      Not sure how much this helps, but if you have any other questions, please let me know!

  10. bfg9000

    Hi,
    great article, thank you! 🙂

    Synology says that the private backup key is transmitted to the backup target server (at least when using Synology C2 cloud backup):
    ‘We value your data as much as you do. You can make a request for the password-protected private key stored on the server side as your last resort. As long as the password doesn’t slip your mind, you can still access your backup data all in one piece.’
    Source: https://blog.synology.com/hyper-backup-encryption-technologies-explained

    This is not good.

    Do you know if this only applies for backups made to the synology C2 cloud or to backblaze (and others), too?

    Thank you in advance! 🙂

    bfg

    1. WunderTech

      This is concerning and I truly appreciate you sharing.

      From what I’ve been able to find, Backblaze does NOT offer this (which is good). Honestly, I’m not entirely why Synology is doing it since the entire point of encryption is to ensure that you manage your data. They weren’t very clear on which password would decrypt their “stored” version of the private key. My assumption is the Synology C2 account, since having the password for the Hyper Backup client-side encryption would allow you to decrypt the backup without the private key file.

      Either way, I’d be very wary of using Synology C2 after reading that. While it may not be the answer that people want to hear, “we can’t do anything” is the correct answer when a customer loses their password/encryption key for an encrypted volume.

      Thanks a lot for sharing. If I can find anything else out, I’ll let you know!

  11. Dave

    I truly appreciate this and your other Synology tutorials!

    If I use Hyper Backup this way, should I disable the bucket versioning (as I’d only need the latest version)?

    1. WunderTech

      I’m glad they help, thank you for reading!

      It’s really up to you. Since Hyper Backup does versioning on its own, it isn’t required, but I know some people like to keep versioning on in Backblaze. In a perfect world, you’ll never need it as Hyper Backup will manage the versioning, but I think people keep it on as the ultimate safety net.

      I realize this isn’t the best answer, it’s just hard to give a recommendation because data differs from person to person. To give some context, I have versioning ON in Backblaze for my Home Movies, but that’s it. It’s turned off for everything else.

      If I can answer any additional questions, please let me know!

  12. jason

    Thanks!!

  13. Jason

    Ok thanks for clarifying. So Synology creates a single encrypted backup file on backblaze? But you’re still able to restore individual files and folders?

    1. WunderTech

      That is correct. When you are in Hyper Backup, use the “Backup Explorer” (icon next to “Back up now”), and you will be asked to enter the encryption key. When you do, backup explorer will open and you’ll be able to navigate through the individual files/folders.

      You can also restore an entire folder by using the “Restore data” button at the bottom left.

  14. jason

    Great write up, thanks. Better than the one from BackBlaze! Question: When you check the use client-side encryption box: it will encrypt the selected folder on the local NAS permanently. After that, if I have a different cloud sync task (Dropbox) running on that folder, will that still function properly? So long as I keep the encryption password, everything else will function normally?

    Just want to clarify and make sure I understand. Thanks for the writeup.

    1. WunderTech

      Thanks for reading the tutorial!

      “Client-side encryption” actually refers to encryption on the backup file itself. Meaning that if someone was to get access to your Backblaze B2 account and try and restore your Hyper Backup file to a different NAS, they would require the encryption key to restore the data. Its sole purpose is to basically encrypt the backup file so that no one can access it without the encryption key. This setting does not encrypt the folder, just the backup file.

      Synology does have folder encryption, but folder encryption is setup in the “shared folder” creation section. With folder encryption, you are able to mount/unmount the folder in DSM. In order to mount the folder, you need the encryption key. I have this explained a little deeper in the “Ultimate Synology NAS Setup & Configuration Guide” post, under “How to Create a Shared Folder”.

      If you use client-side encryption, the encryption is only valid for that individual backup task. If you have a Dropbox Hyper Backup task and you want it encrypted, you will have to add client-side encryption to that as well.

      Please let me know if you have any other questions!

  15. barry b

    Looking forward to implementing this, however as this is also intended as a way out in case you loose your synology, this seems severly limited at the moment as a desaster recovery on a new synology apparently is being performed using AWS V2 signatures instead of V4 used during backups and because of that a restore fails.

    So until Synology fixes this issue, you cannot (or better should not) depend on hyperbackup towards B2 only completely.

    I have no idea what Synology’s roadmap for this is at the moment but I am not looking forward to having my whole Synology die on me and not being able to restore from hyperbackups located on B2 once I have a replacement Synology…

    So I will be making hyperbackups also to a 2nd – remote – synology and to B2, hoping that not both Synologies would die at the same time and being stuck with B2 backups that cannot be restored unto a new synology.

    https://help.backblaze.com/hc/en-us/articles/360047171594-How-to-use-Synology-Hyper-Backup-with-B2?mobile_site=true

    “Note: Hyper Backup supports encrypting backups to Backblaze B2 using V4 signatures. However when you try to restore encrypted backups from a repository in a Disaster Recovery scenario to a new Synology, the restore will use AWS V2 Signatures, even if you choose V4, and your restore will fail. Backblaze B2 only supports V4 signatures, and after June 24, 2020, Amazon will also discontinue support for V2 signatures on any new buckets. Synology is aware of this issue and will be fixing it in the next release. For more information, please contact Synology support.”

    1. WunderTech

      Thanks so much for the great comment! I need to test this out because I’ve configured/tested this (using encryption) and everything worked properly. However, you’re certainly right that if Synology needs to implement a fix and is waiting until their next release, this is not a DR plan and is rather useless in the short term.

      I think that having a second Synology is actually a better solution (assuming you can store it offsite), as you can control costs a lot better than cloud storage. Not that cloud storage is bad by any means. Are you using Hyper Backup/Hyper Backup Vault to do that?

      Thanks a lot for reading and commenting, I really appreciate it!

    2. Daniel Goepp

      I’m not sure if anyone else has tried to validate this since the original post here on July 15, 2020, I would be curious what your results were. I just bought a new NAS (DS920+, replacing DS418play), so I transferred all my files, and started a fresh backup on the new NAS for one of my directories. I then wiped out my old NAS, and did a restore from scratch for a directory that was backed up from the new NAS. I was able to select v4 no problem, and restore all my files no problem. I am assuming this means this bug was addressed and this should not be a concern going forward? As of DSM 6.2.3-25426 Update 2 and Hyper Backup 2.2.6-1316 anyway.

      1. WunderTech

        It’s hard for me to validate that it’s resolved because it was never an issue for me, but it should work as expected. I will try and see if I can find any info and determine if any updates “resolved” the issue that was occurring.

        Thanks for the feedback and for trying to help others!

Leave a Reply