mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-04-27 23:53:18 +02:00
19 lines
476 B
Plaintext
19 lines
476 B
Plaintext
![]() |
#!/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/
|