I recently switched over to Backblaze B2 to store my website backups, and it’s been a great experience. Each B2 bucket has its own lifecycle rules which determines how long to keep previous file versions. My backup B2 bucket is configured with unlimited file versions, which means my nightly incremental WordPress backups, in theory, should be fully restorable at any point in the past. While the data is all safe, there isn’t a good way to do a full time machine style restore.
Rclone gets pretty close however lacks necessary B2 specifics to fully reconstruct.
Rclone is a powerful tool for moving data to and from many cloud providers including support for Backblaze B2. While Rclone can see B2 file versions using an argument
--b2-versions there isn’t an official way to reconstruct the entire folder structure at a particular time. Adding a B2 specific restore in time feature has been discussed however it’s waiting for someone to actually work on adding the new functionality.
Why use B2 for restore in time?
Backups can get really expensive fairly quickly. Currently my customers are using around 1TB of data. If I were to do what most web hosts do and offer a nightly snapshot for the last 30 days my storage usage would increase to 30TBs. Not to mention all of the CPU and memory required to actually make those snapshots.
With B2 storage and file versions enabled only one copy of each site synced regularly is required. That keeps storage requirements and computing costs fairly low with potential of offering some pretty insane restorability. Imagine being able to restore your website from a years ago instead of just the last 30 days. That’s the type of thing that I’m hoping to accomplish using a B2 time machine.
Alternative workarounds using Rclone exists
In the meantime a few scripting alternatives have been created to mimic a restore in time backup. They use Rclone along with some clever syncing and file renaming. One of those solutions is one I wrote in bash which uses Rclone’s
copyto to do a restore in time from B2. It’s not perfect however it’s fairly close. See more on that project over on Github.
A B2 specific restore in time feature for Rclone would be amazing.
Rclone is a written in Go, which are really fast. That means anything bundled into Rclone directly would be significantly faster to alternative approaches. The Rclone project itself means a B2 time machine restore would be widely accessible to other Rclone users. Until that happens I plan on using my Backblaze B2 Time Machine script.