#!/bin/bash # # btrfs-snap - make periodic snapshots of btrfs filesystem # # Copyright (C) 2010 Birger Monsen birger@birger.sh # # This program is distributed under the GNU General Public License # http://www.gnu.org/licenses/gpl.txt # LOG_FACILITY=local0 VERSION="1.0" prog=${0##*/} USAGE="Usage: ${prog} -h for usage help ${prog} -V for version ${prog} " SYNOPSIS="${prog} is the mountpoint of the btrfs file system to make a snapshot of is the prefix to be used in the name of the snapshot. E.g. hourly, daily, weekly... The number of snapshots with the given prefix to keep. btrfs-snap / hourly 24 would make a snapshot in /.snapshot called hourly__