Skip to content

Instantly share code, notes, and snippets.

@jkpark
Created March 8, 2019 02:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jkpark/9ebf5d8f6260c8df04e4b521cacd02c3 to your computer and use it in GitHub Desktop.
Save jkpark/9ebf5d8f6260c8df04e4b521cacd02c3 to your computer and use it in GitHub Desktop.
btrfs snapshot script
#!/bin/bash
if [ "$#" -ne 1 ]; then
echo "No subvolume is supplied."
exit 1
fi
btrfs subvolume snapshot /mnt/hdd1_btrfs/@$1 /mnt/hdd1_btrfs/snapshots/$1/@$1_`date +%Y.%m.%d_%H.%M.%S`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment