Skip to content

Instantly share code, notes, and snippets.

View clexanis's full-sized avatar

clexanis clexanis

  • 16:22 (UTC +02:00)
View GitHub Profile
@olavmrk
olavmrk / lvm-daily-snapshot.sh
Created December 11, 2013 13:24
A script to take daily snapshots of a LVM volume.
#!/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