Zygo / bees

Best-Effort Extent-Same, a btrfs dedupe agent
GNU General Public License v3.0
630 stars 57 forks source link

Containerizing bees? #221

Open har7an opened 2 years ago

har7an commented 2 years ago

Hi,

first of all: I think bees is a great tool, thanks a lot for the effort! I currently use it to deduplicate my backup snapshots from different PCs.

Personally I use Fedora CoreOS-based OSes on all of my PCs (Immutable rootfs, prefers containers and so on), so I decided to pack up bees into a container to run it from there. You can find it here: https://gitlab.com/c8160/bees

I'm by no means an expert on containers and much less on packaging things, but I thought maybe this is interesting for some users? Curious to hear your opinion on this i.e. whether you'd like to include it in your project or not, or if you just prefer to link to it as "unofficial" and I keep taking care of the container myself.

gc-ss commented 2 years ago

This should be part of the main guide, because, even if a person didn't want to run bees Containerized, they can use this to cleanly build bees from source without affecting the host.

https://gitlab.com/c8160/bees/-/blob/main/Containerfile

Thaodan commented 1 year ago

How should this run if not in the coreos itself? The systemd file should sandbox the service already to a great extend. If you use rpm-ostree on your immutable os you can install bees as an rpm package thou.

har7an commented 1 year ago

How should this run if not in the coreos itself?

As a regular podman container. Bees expects to work on the entire FS anyway, so you mount the block device into the container via --device and use the beesd wrapper to set up all the mounts etc. for you. I'm using it like that since I posted the issue here, haven't had issues so far.

If you're curious I can share the entire configuration with you (or maybe update the gitlab project with an example).

If you use rpm-ostree on your immutable os you can install bees as an rpm package thou

Of course I can. I can also install every single graphical application I need as layer on an rpm-ostree host, but that's not how I use these systems. I very much enjoy the flexibility and portability of containers.

LivInTheLookingGlass commented 1 year ago

Would you mind sharing that config for my sake?