Created
March 8, 2019 02:19
-
-
Save jkpark/9ebf5d8f6260c8df04e4b521cacd02c3 to your computer and use it in GitHub Desktop.
btrfs snapshot script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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