dotfiles/.config/zsh/functions/btrfs-snapshot-compare

14 lines
286 B
Bash
Executable File

#!/usr/bin/env zsh
# Compare 2 Btrfs snapshots
setopt LOCAL_OPTIONS ERR_RETURN NO_UNSET PIPE_FAIL
if [[ ${ARGC} -lt 2 ]]; then
print -u 2 "Usage: ${0} <old> <new>"
return 1
fi
local old="${1}"
local new="${2}"
btrfs send --no-data -p "${old}" "${new}" | btrfs receive --dump