-
-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Usage with cloud storage like Amazon S3 or Glacier #123
Comments
No, this is neither implemented nor planned. If you want to push "target raw" backups to your amazon s3 storage, you need to somehow mount it locally. You could use s3fs for this, which should do exactly that. So your setup could be something like this:
If you get this working, please post a note here, so that I could add a section for this on the FAQ. |
Thanks for the reply! Here's what ended up working for me. AWS Block Storage is the same price range per gigabyte as S3, so I created a block storage device and formatted it as BTRFS. I connected the block storage device to a "nano" head node, whose only job is to run btrbk. This setup gives me 500 GB of backup storage for about US$20/mo. |
Amazon S3 is quite pricey if you are looking only for long-term archival. However, services such as Amazon Glacier don't seem to be easily mountable. It would be convenient if
where btrbk run && btrfs send -p `find snapshot_dir/ -mindepth 1 -maxdepth 1 | tail -2` |
(insert a compression and encryption pipeline) |
glacier archive upload my_vault --name=`ls snapshot_dir | tail -1`.btrfs - to one's crontab and be done with it, but then you also need to keep a journal of unsuccessful uploads (due to the machine being offline for example), so that everything gets backed up eventually. This is not an unsurmountable task, but direct support for this kind of usage in |
This is a nice idea, but it's incomplete: As btrbk is stateless, it always needs information of which subvolumes are already present on the target side. For In order to complete this, we should define some data structure: timestamp, UUID, received-UUID, parent-UUID (similar to PS: sorry for the late reply, I'm really busy with other things at the moment... |
My original idea was that
Deleted subvolumes could be removed from the list, so that it does not grow ad infinitum. |
Yeah well, but then people start deleting files on the target by hand, and the mess with the journal starts... I guess glacier also provides some sort of directory listing, so if btrbk would generate filenames the same way as it does for
|
That would be P.S.: I guess |
Yes I understand, and I see the benefit in this, but that's not how btrbk works. Maybe we could introduce a new sub-command for this kind of thing, something like
|
Note that keeping a journal would make it possible to transfer incremental backups even in this setting. |
I've been trying to get this to work. There are a number of issues.
It would be a huge win if btrbk could use S3 APIs directly. Dozens of cloud providers expose an S3 API now. The S3 API is a large surface though. Minimal S3 support probably still requires multiple signature versions and autodetection of multipart uploads, and likely other stuff. In the meantime, I suggest
The expected interactions would then be just like |
Looking for a similar solution, just want to push an encrypted archive of a snapshot into a s3 long term storage such as https://www.ovhcloud.com/en-ca/public-cloud/cold-archive/. For 2$/month/TB its worth it ! I guess I can do it in another way, but directly integrated with btrbk is a must. |
Hm.. instead of implementing the whole S3 API ourselves or jumping the gun with custom scripts, how about adding rclone support for uploading and managing files? It seems like it has all the necessary commands, e.g.:
The only downside is that rclone has its own config format.. that might make it messier than just allowing custom scripts. |
Shameless plug: my simple solution to this problem, https://github.com/kubrickfr/btrfs-send-to-s3 |
I would like to set up a BTRFS filesystem with backups, and was happy to find this project. I would like to have the backups sent to a cloud storage solution, however, instead of a hard drive or SSH server. Most of these cloud storage solutions expose RESTful APIs, and you don't have control over the storage medium they use on their end.
Does btrbk support sending backups to an arbitrary REST interface?
The text was updated successfully, but these errors were encountered: