
Truenas Backblaze Backup and Recovery is a game-changer for data safety. With Backblaze, you can store up to 15TB of data online for just $5 per month.
Setting up Backblaze with Truenas is surprisingly easy. It takes just a few clicks to configure your backup schedule and ensure your data is safely stored in the cloud.
Backblaze offers automatic backup and recovery, so you don't have to worry about losing your data in case of a disaster. Your data is securely stored in multiple locations, and you can easily restore it if needed.
Check this out: Aws S3 Disaster Recovery
TrueNAS and Backblaze Overview
Backblaze b2 is a storage solution that's been around for years and has a s3-compatible API, making it easy to use with many s3-aware applications. This means you can use it with restic, a backup tool that supports multiple storage backends, including local disk.
Backblaze b2 is a cost-effective option, charging 20% of what the same amount of data would cost to store in S3. This is a significant savings for those who need to store large amounts of data.
I've used Backblaze b2 for years and appreciate its reliability and ease of use, which is why I'll be focusing on it in this article.
Broaden your view: Backblaze Cost per Tb
What Are FreeNAS and TrueNAS?
FreeNAS and TrueNAS are two NAS storage environments built on the FreeBSD OS and OpenZFS file system. They share a common open-source foundation, with FreeNAS being the development platform and TrueNAS being the commercial product line.
FreeNAS is geared towards the DIY crowd, perfect for those who enjoy working with bleeding-edge software and figuring out how to make their software and hardware work together. This can be a great learning experience, but it may not be the best choice for critical data environments.
TrueNAS, on the other hand, is a fully supported product designed for business and critical data environments. It's built on the battle-tested framework of FreeNAS and OpenZFS, making it a more reliable option for those who need to protect their data.
The software developed by the FreeNAS community forms the basis for both platforms, so you can expect a high level of compatibility between the two.
Explore further: Backblaze Storage Pod Software
What Is Backblaze B2?
Backblaze B2 is a cloud storage service that provides durable and scalable object storage. It's designed to be a cost-effective alternative to other cloud storage options.
Backblaze B2 stores data in a distributed manner across multiple data centers in the United States, Ireland, and Singapore. This helps ensure data availability and redundancy.
Backblaze B2 is built on a foundation of simplicity, with a focus on ease of use and a straightforward pricing model. This makes it an attractive option for users who want a hassle-free cloud storage experience.
The service offers a range of features, including data encryption, access controls, and a robust API for integration with other applications.
Broaden your view: Does Google Photos Take up Storage
Setting Up Backups
To set up backups with TrueNAS and Backblaze, you'll need to create an SMB share. Create a new SMB share in TrueNAS and point it to the dataset you want to backup.
Give your SMB share a name that makes sense to you, so you can easily identify it later.
This will be the foundation of your backup setup, allowing you to easily transfer data to Backblaze for safekeeping.
Intriguing read: Truenas Nextcloud
Backing Up ZFS Datasets
Backing up your ZFS datasets is a crucial step in protecting your data. You can use a FreeNAS box, also known as TrueNAS Core, to perform reliable backups.
A FreeNAS box is an ideal place to perform set-and-forget backups. This is because both your Linux laptop and the FreeNAS box use the OpenZFS 2.x filesystem.
To create a backup, you'll need to create an SMB share in TrueNAS. Point it to the dataset you want to backup and give it a name.
Take a look at this: Backing up Freenas to Backblaze
Set Up B2
To set up Backblaze B2, you'll need to create a bucket to store your backups in. Give your new bucket a unique name and make sure it's set to private.
You'll also need an application key that restic can use to connect to B2. Do not use your master application key, but rather create a new key specifically for restic.
Copy the key and keyID, as you'll need both when configuring restic. You should restrict restic to just the bucket you want it using - don't give it power over your entire Backblaze account.
For your interest: What Is Backblaze B2
Cloud Sync Options
Cloud Sync Options allow you to seamlessly sync data between your FreeNAS system and cloud storage. You can choose between Push and Pull directions, with Push sending data to cloud storage and Pull retrieving data from the cloud.
The Provider field lets you select the cloud storage provider, with options defined by Cloud Credentials. For example, with Backblaze B2, you can select from existing buckets. Be cautious when choosing a provider, as it will determine the available cloud storage areas.
The Path field is crucial, as it specifies the directories or files on the FreeNAS system that will be sent to cloud storage or retrieved from it. Make sure to choose the correct path to avoid overwriting existing files.
Here's a quick rundown of the Cloud Sync Options settings:
Cloud Sync Options
Cloud Sync Options are a crucial part of setting up a reliable backup system. You can choose from three transfer modes: Sync, Copy, and Move.
Sync mode makes files on the destination system identical to those on the source, while Copy mode copies files from the source to the destination, skipping identical files. Move mode copies files from the source to the destination, deleting files from the source after the copy.
The schedule for your cloud sync job can be set up to run at specific intervals, such as every 5 minutes or every Monday at 2 AM. You can choose from a variety of options, including Every N minutes, Each selected minute, and Each selected hour.
The direction of your cloud sync job is also important. Push mode sends data to cloud storage, while Pull mode retrieves data from cloud storage, overwriting local files with the same names.
Here is a summary of the Cloud Sync Options:
Copy: copy files from the source to the destination, skipping files that are identical (like rsync)
Move: copy files from the source to the destination, deleting files from the source after the copy (like mv)Minuteslider or minute selectionsselect Every N minutes and use the slider to choose a value, or select Each selected minute and choose specific minutesHourslider or hour selectionsselect Every N hours and use the slider to choose a value, or select Each selected hour and choose specific hoursDay of monthslider or day of month selectionsselect Every N days of month and use the slider to choose a value, or select Each selected day of month and choose specific daysMonthcheckboxesmonths when the Cloud Sync runsDay of weekcheckboxesdays of the week when the Cloud Sync runsEnabledcheckboxuncheck to temporarily disable this Cloud Sync
Related reading: How to Make a Copy of a Google Drive Folder
Why B2?
Backblaze b2 is a great choice for cloud storage because it has an S3-compatible API, making it easy to use with S3-aware applications. This means you can leverage the existing infrastructure and tools you're already familiar with.
It's also reassuring to know that Backblaze only does storage, so you don't have to worry about it going away or being acquired by a larger company. This stability is a major advantage over other cloud storage options.
The cost of using Backblaze b2 is significantly lower than S3, with a price tag that's only 20% of what the same amount of data would cost to store in S3. This is a huge cost savings that can add up over time.
Worth a look: Backblaze vs S3
Backup Management
Backup Management is crucial for protecting your data, especially when using a cloud storage service like Backblaze. Backblaze offers automatic backups, which can be scheduled to run daily, weekly, or monthly.
You can choose to backup specific files or folders, or backup your entire system. Backblaze also offers versioning, which means you can recover previous versions of your files if needed.
The backup process is seamless and can be set up to run in the background, so you don't have to worry about it. Backblaze also provides detailed logs and notifications to keep you informed about your backups.
Explore further: Swift Backup Duplicated Google Drive Files
Protect Backups
Protecting your backups is crucial to ensure you can recover your data in case of a disaster. Ransomware increasingly targets backups, so it's essential to have a robust protection plan in place.
Object Lock creates a virtual air gap, protecting data from modification, manipulation, or deletion due to bad actors or human errors. This means your backups are safe and secure, even if your system is compromised.
Regular backups are essential to prevent data loss, but they also need to be protected from being deleted or modified.
For another approach, see: Back up Quickbooks Online
Dependable Disaster Recovery
Having a dependable disaster recovery plan in place is crucial for protecting your data. Backblaze B2 provides a cost-effective off-site disaster recovery solution, making it an ideal choice for businesses and individuals alike.
In the event of an unexpected data loss incident, your VMs, files, or other data stored in Backblaze B2 from FreeNAS or TrueNAS are available for recovery. This means you can quickly get back up and running with minimal downtime.
Here's an interesting read: Azure Recovery Services Vault
Having your data ready and available in B2 Cloud Storage provides a dependable, easy, and cost-effective off-site disaster recovery solution. This level of protection gives you peace of mind, knowing your data is safe and secure.
Disaster recovery experts rely on Backblaze B2 as a critical line of defense, making it a trusted solution for continuity centers.
Test Your Backups
Testing your backups is a crucial step in ensuring you can recover your data in case of a disaster. This process should be done from inside the backups jail you created.
To do this, you'll need to SSH to your server and run the command `sudo iocage console YOURJAILNAME`. This will give you access to the jail.
Setting the `BACKUPS_PATH` in your settings file to a single small directory can make your testing much faster. This allows you to quickly test your backups without having to sift through a large directory tree.
Restic and Jail Configuration
To set up restic on your TrueNAS system, you'll need to create a jail using the TrueNAS wizard. This involves logging into your TrueNAS webui, clicking Jails, and then adding a new jail.
The TrueNAS wizard will guide you through the process of creating the jail, but here are the key steps: give it a name without spaces or special characters, select the latest FreeBSD version available, and ensure network access by configuring DHCP Autoconfigure and VNET.
Here are the key features of restic that make it a great choice for TrueNAS users: Open SourceWorks on various operating systems including FreeBSDWritten in go, resulting in a single binary blobSupports data deduplication and compression
Why Restic?
Restic is an excellent choice for our backup needs, and here's why. It's open source, which means it's free to use and modify.
Restic also works seamlessly on various operating systems, including macOS, Windows, Linux, and FreeBSD, which is crucial for our TrueNAS setup.
The fact that it's written in Go makes it a single binary blob, eliminating the need to install multiple dependencies within the jail.
This simplicity is a huge plus, as it reduces the complexity of our setup and makes it easier to manage.
Restic also offers data deduplication and compression, which is a game-changer when it comes to reducing storage costs. Since we pay Backblaze based on space usage, this feature helps us save money on our backup bills.
Here are the key benefits of using Restic:
- Open Source
- Works on various operating systems, including macOS, Windows, Linux, and FreeBSD
- Single binary blob, eliminating the need for multiple dependencies
- Data deduplication and compression for reduced storage costs
Create a Restic Jail
To create a restic jail, you'll need to log into your TrueNAS webui. Click on the Jails tab and then the "Add" button. Give your jail a name without spaces or special characters, except for dashes, and select the highest available FreeBSD version from the release drop-down menu.
You'll need to configure network access for your jail. Click on "DHCP Autoconfigure" and also enable the VNET checkbox, if it's not already populated. This will give your jail the network access it needs to function.
Here are the steps to create the jail in a concise list:
- Log into your TrueNAS webui
- Click Jails and then Add
- Give your jail a name, select the highest available FreeBSD version, and click Next
- Configure network access with DHCP Autoconfigure and VNET
- Click Submit to create the new jail
Sources
- https://silvester.org.uk/category/freenas/truenas-core/
- https://www.backblaze.com/blog/how-to-setup-freenas-cloud-storage/
- https://www.backblaze.com/cloud-storage/solutions/ransomware-readiness-and-recovery
- https://bufu-sec.com/posts/truenas_backup_to_backblaze/
- https://unixorn.github.io/post/restic-backups-on-truenas/
Featured Images: pexels.com