Deploy benji backup using docker containers.
This role assumes docker daemon is already installed in the destination host.
You also need the ansible collection community.docker.docker_compose
. This collection
is probably already available in your system if you have installed ansible but you can
also install it with ansible-galaxy collection install community.docker
)
All the examples are executed in the host running the docker daemon (outside the container)
This assumes the ceph client is "benji"
benji-backups$> sudo rbd --id benji -p volumes ls
volume-29c99562-9882-481f-aecc-d5b2d104057a
volume-e30044c2-61b7-40c3-805c-26a7ece9b2fb
$1 = ceph pool
$2 = volume name
$> benji-backup volumes 29c99562-9882-481f-aecc-d5b2d104057a
Before you restore a volume it's recommended to stop the destination VM using openstack stop vm_id
You also have to identify to which ceph pool you have to restore the volume. Details below:
When booting a VM from an image the root volume will be stored in ceph pool vms
. The volume name
is in format "${vm_id}_disk" e.g.
benji-backups$> sudo rbd --id benji -p vms ls
0a5f5bb5-3870-47a5-9925-934065f29bac_disk
Openstack volumes are stored in ceph pool volumes
. The volume name format is "${volume_id}" e.g.
benji-backups$> sudo rbd --ide benji -p volumes ls
e30044c2-61b7-40c3-805c-26a7ece9b2fb
$1 = benji backup uid (get it using benji-list)
$2 = destination ceph pool
$3 = volume name (this must exist in the pool and it will be overriden with the backup data)
$> benji-restore -f volumes/volume-29c99562-9882-481f-aecc-d5b2d104057a-t6ueth volumes e30044c2-61b7-40c3-825c-24a7e4ee9b2fb
Apache 2.0