This file contains 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
#!/usr/bin/env bash | |
# | |
# Runs a command wrapped with snapper pre-post snapshots for btrfs subvolumes. | |
# Usage: snp [-c config1,config2,...] <command> | |
# Constants | |
readonly LOG_PATH='/var/local/log/snp' | |
readonly DATE="$(date +'%Y-%m-%d-%H%M%S')" | |
readonly LOG_FILE="${LOG_PATH}/snp-${DATE}.log" |