Migrating from Backblaze B2 to HDD-Housing
Note: In S3 addresses,
customeridstands for your HDD-Housing customer ID.
This guide copies existing backups from Backblaze B2 to your S3 storage at HDD-Housing with rclone. The same applies to other S3 providers (Amazon S3, Hetzner Object Storage …), only the source is set up differently in rclone. The reasons for switching are compared in the guide Alternative to Backblaze B2, Amazon S3 and Hetzner Storage Box.
Copy or start fresh?
- Copying makes sense if you want to keep your existing version history and the amount of data fits through your connection in a reasonable time. The data is transferred via the machine running rclone.
- Starting fresh is recommended for large amounts of data: create a new backup locally on your hard drive and send it to us (create a pool). Keep the old backup at B2 until you no longer need the old versions.
Check the download terms of your Backblaze plan before copying larger amounts.
Requirements
- rclone is installed.
- A Backblaze application key with read access to the buckets (keyID and applicationKey; the master account ID does not work with rclone).
- The HDD-Housing S3 credentials from your welcome email (or from your test account).
1. Set up rclone
Add Backblaze B2 as the source and HDD-Housing as the destination:
rclone config create b2 b2 account keyID key applicationKey
rclone config create hddhousing s3 provider Other endpoint https://s3.customerid.hdd-housing.at region us-east-1 access_key_id access_key secret_access_key secret_key
rclone lsd b2:
rclone lsd hddhousing:
2. Copy buckets
Create a destination for each bucket and copy it:
rclone mkdir hddhousing:bucket_name
rclone sync b2:bucket_name hddhousing:bucket_name --progress
rclone sync makes the destination identical to the source. If it is interrupted, run the same command again; files already copied are skipped. For large buckets, start the command in screen or tmux.
If backups continue to run to B2 while copying, run rclone sync again before switching over (step 4). Only the changes are then transferred.
3. Verify
rclone check b2:bucket_name hddhousing:bucket_name --size-only
The output must end with 0 differences found. B2 and S3 use different checksums (SHA-1 and MD5), so --size-only compares names and sizes. Structure and readability are then verified with the backup software, see step 4.
4. Switch the backup software
Switch between two backup runs, after a final rclone sync.
restic: the repository stays the same, only the address changes. Set the HDD-Housing S3 credentials as AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY (instead of B2_ACCOUNT_ID and B2_ACCOUNT_KEY or your previous B2 S3 credentials) (see the restic guide):
restic -r s3:https://s3.customerid.hdd-housing.at/bucket_name snapshots
restic -r s3:https://s3.customerid.hdd-housing.at/bucket_name check
restic -r s3:https://s3.customerid.hdd-housing.at/bucket_name ls latest
restic -r s3:https://s3.customerid.hdd-housing.at/bucket_name restore latest --target /tmp/restore-test --include /path/to/file
check verifies the repository structure and only reads metadata. To verify the content, restore individual files: restic ls latest shows the path, the file is restored to /tmp/restore-test. Then replace the repository address in your backup script (previously b2:bucket_name:path or, via the B2 S3 interface, s3:https://s3.region.backblazeb2.com/bucket_name/path; append any path inside the bucket to the new address, e.g. …/bucket_name/path).
BorgBackup with a local repository and rclone (as in the Borg guide): the local repository is complete, so steps 2 and 3 are not needed. In your backup script, only change the rclone sync destination to hddhousing:bucket_name/borg-repo. The first run transfers the whole repository.
Synology Hyper Backup and other programs: the simplest approach is to create a new backup task with the HDD-Housing S3 destination (server address s3.customerid.hdd-housing.at; if a region is required: us-east-1). Only delete the old task at B2 once you no longer need the old versions.
5. Clean up
Only once backups have been running without errors at HDD-Housing for a few days and a test restore has worked, delete the data at Backblaze and revoke the application key.
What is not transferred
- Older file versions and hidden files in B2: rclone only copies the current version of each file. From the migration on, older versions are kept by the ZFS snapshots at HDD-Housing.
- Lifecycle rules and Object Lock from B2. At HDD-Housing, snapshots provide protection against deletion; you decide how many are kept.
More options in the rclone documentation for B2 and for rclone sync.