Nextcloud B2

Posted : admin On 1/2/2022

I recently wrote a post about moving from Nextcloud to Synology, in that post I mention how I’m backing up to Backblaze B2. This post explains how I configured that.

So you want to backup a Synology to Backblaze B2? Well, so does my friend and Fosstodon co-founder, Mike Stone who asked for more detail around how I backup to Backblaze B2 storage. Fosstodon has a limit of 500 characters and that wasn’t going to cut it, so I decided to write a post instead.

Release Details; Updated: March 1, 2021, 8:39 p.m. Changelog: Added. Support for Nextcloud 21 #830 Support for PHP 8.0; Comprehensive Finnish translation for the main application. Nextcloud Talk goes further than other encrypted communication technologies by keeping even metadata from leaking. This ensures you stay in complete control of communications. When SCM was looking for a simple, secure and well designed messenger platform that could be hosted on-premises, a decision was made for Nextcloud Talk.

Synology Cloud Sync

Nextcloud B2 Plus

So to backup to B2, I’m using the Synology Cloud Sync application. This is easily installed with a single click via the Synology Package Manager.

Personally I backup all user home folders, as well as our Family Share folder to B2. I could backup all the media on my Synology, but that would be very expensive. I tend to make sure that my crucial data is still available, even if I lose all my local data. Multimedia files aren’t crucial and can be replaced, so I’m comfortable with just having local backups for that.

Adding a new backup

I’m not going to take you through the process step by step, as it’s pretty straightforward. What I will do though, is show you how I’ve configured my backups and what those settings mean.

Nextcloud

Here is a screenshot of the configuration for one of my B2 backup routines:

Encryption

When setting up the B2 backup routine, it’s very important to ensure encryption is enabled. This means that all of your data is encrypted at rest, so nobody except you can access it.

You will be asked to configure and encryption passphrase. Once configured, Synology will download certificates so you can decrypt your data later.

Keep both the certificates and passphrase safe. If you lose either of these, you will not be able to retrieve your data!

Sync Direction Settings

Set this option to “Upload Local Changes Only” and check the box that says “Don’t remove files in the destination folder…” Using both of these settings means that files will only sync one way – up to Backblaze. And if you delete a file, that deletion will not be synced.

Nextcloud

Duplicates

Let’s say you have a spreadsheet you use to manage your finances. You add your monthly finances for January, then again in February. Cloud Sync will not overwrite your finances file with the new revisions.

Instead, Backblaze treats duplicated files as a new version. Now, this may result in you using more storage within your B2 bucket, but the cost probably won’t be significant. Plus it will allow you to roll back if you need to.

I personally set the Lifecycle Settings within my buckets to 14 days. This means that B2 will keep 14 days worth of versions for any file.

Cost

Backblaze B2 is really cheap. For example, I have 2 buckets – one for home folders and the other for our family share. Over the 2 buckets, I have approximately 150GB of data stored in B2.

My invoice for January 2020 was just $0.39! Backblaze have an online calculator that should give you an idea of what backing up to their service will cost you.

Nextcloud B2 Pro

Conclusion

This post should give you a good idea of how to backup a Synology to Backblaze B2. To be honest, it’s easy to configure and once it’s done, you can pretty much set it and forget it. Just make sure you do a test restore!

If you have any questions about this process, please feel free to get in touch with me.

By default, Nextcloud store users' files in nextcloud/data, but you might want to take advantage of the benefits of object stores and use them as primary storage. Nextcloud allows using object store as primary storage. Note that nextcloud/data could still be in use for other reasons.

What does it imply?

Nextcloud B2 Storage

Object storage can be used either as primary storage or as external storage. When it is used as primary storage, the object store only store the file content by using a unique identifier. No metadata are stored in the object store: no files names, no directory structures, etc. Nextcloud assumes exclusive access over the bucket being used.

This has benefits and downsides: performance is better when you use an object store as primary storage, but it restricts being able to access the files from outside of Nextcloud.

Configuring

Nextcloud

Primary object stores need to be configured in config.php by specifying the objectstore backend and any backend specific configuration.


Subscriber exclusive content

A Nextcloud Enterprise Subscription provides unlimited access to our knowledge base articles and direct access to Nextcloud engineers.

Customers and Partners

Nextcloud B2b

Log in for full access

Nextcloud B2 Storage

Log in

Nextcloud B2c

Need support?