Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Itachi jayagami

🎯
Focusing
View GitHub Profile
@olavmrk
olavmrk / lvm-daily-snapshot.sh
Created Dec 11, 2013
A script to take daily snapshots of a LVM volume.
View lvm-daily-snapshot.sh
#!/bin/bash
KEEP_DAYS=15
VG="vg" # LVM volume group we are snapshoting
LV="data-volume-name" # Name of LVM-volume to take a snapshot of
BACKUP_PREFIX="backup-volume-prefix-" # Prefix of snapshot volume name.
SIZE=40G # Amount of disk space to allocate for the snapshot
# Create new snapshot