mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-04-16 02:03:09 +02:00
19 lines
476 B
Django/Jinja
19 lines
476 B
Django/Jinja
#!/bin/bash
|
|
|
|
set -eo pipefail
|
|
|
|
mkdir -p /home/lbkp/linstor/
|
|
|
|
{% if linctl_ha %}
|
|
# Check we are the current active node. Else, just skip the backup
|
|
if [[ ! -e /var/lib/linstor/linstordb.mv.db ]]; then
|
|
echo Linstor DB not available on this node, skipping backup
|
|
exit 0
|
|
fi
|
|
{% endif %}
|
|
|
|
echo Dumping linstor DB dump
|
|
linstor controller backupdb linstor_backup
|
|
echo Moving dump to /home/lbkp/linstor/linstor_backup.zip
|
|
mv /var/lib/linstor/linstor_backup.zip /home/lbkp/linstor/
|