Skip to content

Instantly share code, notes, and snippets.

View lvm-backup.sh
#!/bin/bash
LVS="lv_os_win10"
LVS_TAR="lv_data lv_os_arch"
TARGET="/mnt/data/backup"
for LV in $LVS
do
echo creating snapshot $LV
lvcreate -L50G -s -n backup_$LV /dev/vg/$LV || continue