Docker image to run backups using backintime and SSH
456
Docker container to perform backups using backintime (oriented towards SSH backup mode)
latest Dockerfilewake-on-lan DockerfileLatest version of backintime (installed from source).
Same as latest, but with the additional feature of powering on the backup
target with WOL and shutting it down again after the backup. For shutting down
the backup target, please have a look at the bottom of this file so see how you
have to configure sudoers for the backup target.
docker pull intelliops/backintime:latest
docker run -ti --name backintime \
-v /home/<USER>/.ssh/id_rsa:/root/.ssh/id_rsa:ro \
-v /home:/host/home:ro \
-v /etc:/host/etc:ro \
-v /root:/host/root:ro \
-v /usr:/host/usr:ro \
--net=host \
--privileged \
intelliops/backintime:latest
docker run -ti --name backintime \
-e MAC=aa:bb:cc:00:11:22 \
-e INTF=eth0 \
-v /home/<USER>/.ssh/id_rsa:/root/.ssh/id_rsa:ro \
-v /home:/host/home:ro \
-v /etc:/host/etc:ro \
-v /root:/host/root:ro \
-v /usr:/host/usr:ro \
--net=host \
--privileged \
intelliops/backintime:wake-on-lan
TODO: remove privileged flag and specify only needed capabilities:
--cap-add=NET_ADMIN \
--cap-add=NET_BROADCAST \
--cap-add=NET_RAW \
--cap-add=SYS_RESOURCE \
--cap-add=SYS_ADMIN --device /dev/fuse
The backup process will start immediately after starting the container.
| Path | Description |
|---|---|
| /root/.ssh/id_rsa | SSH key to login to the backup target |
| /etc/backintime/config | Configuration of backintime |
| /host/<FOLDER_TO_BACKUP> | Directories that need to be included in the backup |
Only relevant for wake-on-lan version of the Docker image.
| Environmental variable | Description |
|---|---|
| MAC | The MAC address of the backup target that will be awakened by WOL |
| INTF | The network interface of the host performing the backup, where the backup target can be found on |
To run the backup, you will have to mount the backintime configuration file into
the Docker container. An example can be found back in backintime.example.
The backup target is shutdown after a successful backup. For performing the shutdown
command, super user permissions are needed. Which means that the following entry has to
be added in /etc/sudoers to make this work.
<USER> ALL=NOPASSWD: /sbin/shutdown
Content type
Image
Digest
Size
75 MB
Last updated
almost 8 years ago
docker pull intelliops/backintime