Hello,
I currently back up to a B2 bucket, and I plan on doing a restore from it in the near future.
B2 has the ability to send me a USB hard drive with the bucket data on it, but I’m not sure how that would work with kopia’s restore function.
Is there a way to do a restore from a local drive for a B2 repository, or do I need to restore directly from B2?
This can work with only minimal interventions - you need to effectively convert B2 storage format to local repository format and connect to it as if it were a local filesystem repository. There are 2 changes that need to be made:
-
Files in cloud buckets (B2, S3, etc.) don’t have extensions, files in local directory have “.f” extensions for atomicity reasons so you would need to rename each file to end with .f
-
Files in local repositories usually use sharding, but that can be disabled, so when connecting to such recovered repository you can use --flat
option.
There may be some small details I’m missing, but in principle there’s no reason why such restore can’t be done. Definitely let us know how it goes.
1 Like
It was actually pretty simple to set up and restore!
- Backblaze sends its drives as NTFS on an encrypted WD Passport, so I needed to use this program to unlock the drive and install ntfs-3g to mount it.
- After mounting, I just needed to rename everything to have the
.f
extension. I’m using zsh so I used autoload zmv; zmv '(*)' '$1.f'
in the bucket directory.
kopia repository connect filesystem --path=path/to/bucket/dir --flat
From there I simply had to restore the files I wanted.