#!/bin/bash # # cephfs-snap - make periodic snapshots of cephfs filesystem # Brett Kelly 2018 bkelly@45drives.com # # Adapted from btrfs-snap # 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 cephfs 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. cephfs-snap /mnt/server hourly 24 would make a snapshot in /mnt/server/.snap/ called hourly__