Backup Nextcloud To Backblaze B2



Whatever your backup or sync scenario, ChronoSync has got you covered!

Backup complete and uploaded to b2 backblaze cloud. I’ll write a new post on how to recover your server with B2 Backblaze using Hashbackup soon. But to put it simply, you need to copy your “dest.conf” & “key.conf” on the new server in a folder “/root/hbdir” then run this command. Hb recover -c /root/hbdir. Backblaze is a company that hosts data in the cloud at a REALLY low price and with B2 you can use it like AWS storage. I'd be great if you could use B2 to sync your Nextcloud server to Backblaze.

MORE GUIDES

How To Configure and Backup to Backblaze B2 Storage

Backblaze B2 Cloud Storage (B2) is a pay-for-what-you-use cloud service for storing files in the cloud. Files are available for download at any time, either through the API or through a browser-compatible URL.

With the arrival of ChronoSync v4.8.6, connecting and backing up to Backblaze B2 storage provider is quick and easy. This guide will provide all the steps necessary to get you set up with a Backblaze B2 account and get your important data backed up to your own personal cloud.

If you already have a Backblaze account, you can begin with the next step, CREATE A BUCKET. Otherwise, follow these steps to sign up for a Backblaze B2 account:

  • Go to the Backblaze B2 Cloud Storage website and click on 'Sign up today.' At the time of this writing, you are given 10GB of free storage, unlimited free uploads and 1GB of downloads each day.
  • Fill out the 'Email' and 'Password' fields.
  • Click on 'Sign Up for B2.'
  • A handful of quick start guides are presented to you. It's your choice whether or not to view them. For this example, 'Skip Quick Start - Take Me To My Account' is chosen.
  • You are asked to sign back into your account. Provide your email.
  • Click 'Next.'
  • Provide your password.
  • Click 'Sign In.'
  • You will be required to add a phone number to your account before proceeding. Go to 'My Settings' to do this and then verify your phone number.
  • Determine if you would like to use two-factor verification.

If you already have buckets defined that you wish to backup to, you can skip to the next section, RETRIEVE KEY ID & APPLICATION KEY.

A 'Bucket' is a container for objects stored in Backblaze B2. You can create as many buckets as you'd like. In ChronoSync, once connected to the B2 service, you'll select one of your buckets to backup to.

To create a bucket:

  • Click on 'Buckets' in the left side menu.
  • Click on the 'Create a Bucket' link.
  • Provide a unique name for your bucket and determine whether you want it private or public.
  • Click on 'Create a Bucket.'
  • If your bucket name is accepted, you'll see your bucket information listed.
  • Backblaze recommends that all bucket names comply with DNS naming conventions and need to be unique. It is not recommended to use periods in the name. We recommend using hyphens, e.g. “smith-fred-pics-graduation'. What you need to know about B2 Bucket names.

    To make a connection to Backblaze B2 , ChronoSync needs your access key credentials in order to access the buckets under your account. ChronoSync requires two keys: the 'Key ID' and the 'Application Key'. Follow these instructions to enable your access keys:

    • Click on the 'App Keys' link in the sidebar.

    Here, you can choose to create a key that works for all Backblaze B2 supported applications by selecting 'Generate New Master Application Key' or choose 'Add a New Application Key' to generate an application-specific Application Key. We recommend that you create a ChronoSync-specific Application Key.

    • Click on 'Add a New Application Key.'
    • Under the 'Add Application Key' section, complete the desired fields.
    • Click on 'Create Application Key' and one is generated for you. Make note of this. You'll need it later in ChronoSync.
    • Using this method, Backblaze also generates a 'keyId' for you. Make note of this, as well.
    • 'Close' the window.

    NOTE: If you choose to create a Master Application Key rather than the Application Specific Key, you'll need to make note of the 'Account ID'. You'll need it later in ChronoSync.

    Now that you have everything set up in Backblaze, you can move over to ChronoSync and set things up so you can begin backing up to the B2 service. Follow the steps below to set up a Backblaze B2 connection profile. Once this is done, you can select Backblaze B2 as one of your targets and then back up to it.

    • Open Preferences in ChronoSync.
    • Go to Connections Preferences.
    • Click on the plus sign to add a new connection profile.
    • Provide a name.
    • Choose 'Backblaze B2' for Connection Type.
    • Provide the keyId and applicationKey you received in the Backblaze B2 Dashboard. If you created a Master Key, it'll have its own keyId and applicationKey.
    • “Test” the connection.

    Backblaze B2 Price

    • If valid, click on “Next” to set up the Advanced connection profile features.
    • Set whichever Advanced options you'd like. For a thorough explanation of them, click on the Help button to visit the ChronoSync help.
    • When finished, click on “Save” to save the profile.
    • Now you’re ready to connect to Backblaze B2 and backup to it!

    To connect to Backblaze B2, you set up your targets just like you would with any synchronizer task. Follow these steps to set up a Left-to-right Backup of a local folder to a Backblaze B2 bucket:

    • Select your Source target by clicking on 'Choose...' in the Setup panel's Source pane.
    • On the Destination pane, choose the Backblaze B2 connection you just created from the 'Connect to:' menu.
    • Click 'Choose...' to select a bucket from your Backblaze B2 account.
    • Click on 'Select' to close the sheet.
    Backup Nextcloud To Backblaze B2

    At this point, your backup is ready to run. If you wish to set rules or options, visit the respective panel.

    • Click the big right arrow in the middle of the Setup panel (or choose 'Synchronize' from the toolbar) to perform the backup.

    That's it! You have now backed up files to a Backblaze B2 bucket!

    For most people, the above steps will work flawlessly for setting up a Backblaze B2 account, connecting and backing up to it. However, we live in an imperfect world and sometimes things just don't work out as expected. If you encounter any problems following this tutorial, here's some tips that may help you get back on track:

    The Backblaze B2 website has documentation and forums in case you run into any problems with your B2 account.

    CHRONOSYNC HELP [top]

    From the 'Help' menu in ChronoSync, you can try some of the following search terms (minus the quotes):

    'Connections'
    'Profiles'
    'Backblaze'
    'Targets'

    Check out the following guides that may help you when configuring connection profiles:

    • Remote Bootable Backups (Configuring a connection profile starts at the 1:06 mark)

    TECHNICAL SUPPORT [top]

    Contact our technical support team and just ask! We don’t mind — we're here to help!

    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.

    Backup

    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.

    Synology Cloud Sync

    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

    Backup Nextcloud To Backblaze B2 Drive

    Backup Nextcloud To Backblaze B2

    Backblaze B2 Client

    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.

    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.

    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 Cloud Storage

    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.

    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!

    Veeam Backblaze B2

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





    Comments are closed.