Urbackup to backup whole docker?

Yo

Using a debian10 here as docker host. Got multiple docker inside and I want to backup the whole docker (images + volumes) using urbackup.
The goal is : In case of complete loss of docker host I wanna be able to restore everything…

Could urbackup do the job backuping /var/lib/docker/ every night ?
Is there a better way to achieve this ?

Thx !

Backing up should work, depends a bit on your Docker storage engine, though. It’ll backup a single file a lot of times with e.g. LVM and btrfs as docker storage and restoring LVM or btrfs would probably be difficult.
With overlayfs you should test if it properly backups and restores the whiteout files.

The whole point of docker containers is that you can rebuild them at any time :wink:

What i do is backup the volumes on one side and the docker images on the other side.
(they are actually in the permanent volume of gitlab)

I make sure to set put all permanent volumes in the same host folder
then mount bind that folder in the urbackup container

@uroni : I use overlayfs, i’ll try a restore soon and update here.

@orogor : “backup the docker images on one side and the docker images on the other side” , the [volumes] other side you mean ?
I use urbackup natively so no need to bind I think :slight_smile:

yes