exclude drbd disks from list

This commit is contained in:
Jérémy Lecour 2019-09-05 11:15:25 +02:00 committed by Jérémy Lecour
parent e2156ad41a
commit 04296895da

View file

@ -252,7 +252,7 @@ if [ "${LOCAL_TASKS}" = "1" ]; then
apt-cache dumpavail > ${LOCAL_BACKUP_DIR}/packages.available
## Dump MBR / table partitions
disks=$(lsblk -l | grep disk | awk '{print $1}')
disks=$(lsblk -l | grep disk | grep -v drbd | awk '{print $1}')
for disk in ${disks}; do
dd if="/dev/${disk}" of="${LOCAL_BACKUP_DIR}/MBR-${disk}" bs=512 count=1 2>&1 | grep -Ev "(records in|records out|512 bytes)"
fdisk -l "/dev/${disk}" > "${LOCAL_BACKUP_DIR}/partitions-${disk}"