#!/bin/bash # # NextcloudPi scheduled datadir BTRFS snapshots # # Copyleft 2017 by Ignacio Nunez Hernanz # GPL licensed (see end of file) * Use at your own risk! # # More at https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ # install() { wget https://raw.githubusercontent.com/nachoparker/btrfs-snp/master/btrfs-snp -O /usr/local/bin/btrfs-snp chmod +x /usr/local/bin/btrfs-snp } configure() { [[ "$ACTIVE" != "yes" ]] && { rm -f /etc/cron.hourly/btrfs-snp echo "automatic snapshots disabled" return 0 } cat > /etc/cron.hourly/btrfs-snp <