zzz_evobackup: better disks detection
This commit is contained in:
parent
3d3e235ecc
commit
d0afc0089c
|
@ -234,7 +234,8 @@ if [ "${SYSTEM}" = "linux" ]; then
|
||||||
apt-cache dumpavail > ${LOCAL_BACKUP_DIR}/packages.available
|
apt-cache dumpavail > ${LOCAL_BACKUP_DIR}/packages.available
|
||||||
|
|
||||||
## Dump MBR / table partitions
|
## Dump MBR / table partitions
|
||||||
for disk in /dev/[sv]d[a-z]; do
|
disks=$(find /dev/ -regex '/dev/\([sv]d[a-z]\|nvme.*p\)[0-9]')
|
||||||
|
for disk in ${disks}; do
|
||||||
name=$(basename "${disk}")
|
name=$(basename "${disk}")
|
||||||
dd if="${disk}" of="${LOCAL_BACKUP_DIR}/MBR-${name}" bs=512 count=1 2>&1 | egrep -v "(records in|records out|512 bytes)"
|
dd if="${disk}" of="${LOCAL_BACKUP_DIR}/MBR-${name}" bs=512 count=1 2>&1 | egrep -v "(records in|records out|512 bytes)"
|
||||||
fdisk -l "${disk}" > "${LOCAL_BACKUP_DIR}/partitions-${name}"
|
fdisk -l "${disk}" > "${LOCAL_BACKUP_DIR}/partitions-${name}"
|
||||||
|
|
Loading…
Reference in a new issue