From 5a15f65db3dfb245919bdd534e93bd711db2eb60 Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Sat, 24 Mar 2018 03:05:47 +0100 Subject: Minor tunning --- roles/ands_backup/templates/backup.sh.j2 | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'roles/ands_backup') diff --git a/roles/ands_backup/templates/backup.sh.j2 b/roles/ands_backup/templates/backup.sh.j2 index c362957..b9884ea 100755 --- a/roles/ands_backup/templates/backup.sh.j2 +++ b/roles/ands_backup/templates/backup.sh.j2 @@ -37,13 +37,20 @@ etcdctl3 --endpoints="192.168.213.1:2379" snapshot save "$backup_path/etcd/snaps mkdir -p "$backup_path/heketi" || { echo "Can't create ${backup_path}/heketi" ; exit 1 ; } heketi-cli -s http://heketi-storage.glusterfs.svc.cluster.local:8080 --user admin --secret "$(oc get secret heketi-storage-admin-secret -n glusterfs -o jsonpath='{.data.key}' | base64 -d)" topology info > "$backup_path/heketi/heketi_topology.json" heketi-cli -s http://heketi-storage.glusterfs.svc.cluster.local:8080 --user admin --secret "$(oc get secret heketi-storage-admin-secret -n glusterfs -o jsonpath='{.data.key}' | base64 -d)" db dump > "$backup_path/heketi/heketi_db.json" -lvs > "$backup_path/heketi/lvs.txt" 2>/dev/null -lvm fullreport --reportformat json > "$backup_path/heketi/lvm.json" 2>/dev/null gluster --xml volume info > "$backup_path/heketi/gluster-info.xml" gluster --xml volume status > "$backup_path/heketi/gluster-status.xml" gluster volume status > "$backup_path/heketi/gluster.txt" {% endif %} +mkdir -p "$backup_path/lvm" || { echo "Can't create ${backup_path}/lvm" ; exit 1 ; } +lvs > "$backup_path/lvm/lvs.txt" 2>/dev/null +lvm fullreport --reportformat json > "$backup_path/lvm/lvm.json" 2>/dev/null +dmsetup ls --tree > "$backup_path/lvm/dmesetup.txt" 2>/dev/null +vglist=$(vgdisplay | grep -oP "VG Name\s+\K.*") +for vg in $vglist; do + vgcfgbackup -f "$backup_path/lvm/vg-$vg.backup" "$vg" &>/dev/null +done + {% if 'ands_storage_servers' in group_names %} # Gluster -- cgit v1.2.3