Recommendation for securing Docker containers

16 views
Skip to first unread message

Stefan Harbich

unread,
Dec 31, 2024, 2:25:37 PM12/31/24
to bareos-users
Hello everyone,
is there a recommendation on how I can back up Docker containers with Bareos? For example:
- Install Bareos-fd in the existing container (works for very few containers. Dependencies are missing)?
- Create a complete new container in which only the Bareos-fd service runs (then back up the existing containers. How does the recovery work then?)
I would be happy to receive feedback and instructions if necessary.
Greetings from Stefan Harbich

Go Away

unread,
Dec 31, 2024, 6:59:31 PM12/31/24
to bareos-users
The idea of containers is that they are lightweight, stateless, immutable, disposable and so on. So there is no point of making a backup from inside of a running container because:
1) You should be able to recreate such container in no time using a container image(s) or even build it from scratch using a dockerfile
2) You wouldn't be able to reasonably restore such backup into a running container
So you need to backup the image(s) for your containers and their configuration (whether passed by "docker run" parameters or externalized into a directory/directories mounted to the container. That's all what you'd do from the base system, not from within the containers.
And - if applicable - the state of application externalized into some storage unit. And here's where the fun starts because there is no universal way to back up such data. It's just like with a non-containerized environment - you wouldn't just back up running database files because you'd not have a consistent and healthy database state. So it's up to you to know what the app within the container does and be able to get a consistent state image from it. It's almost the same as backing up any ordinary app with some extra steps if you need to interact with the app in container from the base system.

--
You received this message because you are subscribed to the Google Groups "bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bareos-users...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/bareos-users/c64da83a-b006-4dca-b76c-3e7ab0390cc0n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages