btrfs-snap-script, bash script to easily manage ubuntu btrfs snapshots Jason Jorgensen Version 1.6 02-25-2014 1. Introduction 2. Installation 3. Usage 4. Copyright ----------------------------------------- 1. Introduction I wanted a simple bash script that I could install quickly and easily on ubuntu workstations and servers that would automatically snapshot btrfs volumes for me. Ubuntu sets up their btrfs volumes with @ and @home subvolumes. BTRFS Volume Root subvolume (0) --+-> Subvolume @ ---> Directory / +-> Subvolume @home ---> Directory /home +-> Subvolume snaptshots made by this script also stored at this level. My debian installs also get converted to this layout. I have been running this script on all my btrfs workstations and servers for months with no issues so far. Current Features: - Snapshot a btrfs subvolume based on a name and a timestamp - Default snapshot from cron hourly, daily, weekly, monthly - Automatically expire and remove old snapshots - Easy to manual snapshot a volume before a big change and it will not auto expire via the default cron jobs - List out all existing snapshots - Easily delete existing snapshots The latest version of btrfs-snap-script is available at http://www.innominatus.com ----------------------------------------- 2. Installation - wget http://innominatus.com/releases/btrfs-snap-script/btrfs-snap-script_latest_all.deb - dpkg -i btrfs-snap-script_latest_all.deb - Change /etc/default/btrfs-snap-script "CRON=0" to "CRON=1" to enable it ----------------------------------------- 3. Usage Usage: btrfs-snap-script [options]