btrfs send takes options before arguments

btrfs-progs 4.11 includes this patch[0] which has updated the option
parser which has enforced the order in which arguments and options
appear in. See this email for context[1]

[0]: https://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git/commit/?id=010ceab56e067b87ea282fde6ff792c1ceefd7dc
[1]: https://www.mail-archive.com/linux-btrfs@vger.kernel.org/msg62226.html
This commit is contained in:
Wael M. Nasreddine
2017-05-28 23:05:06 -07:00
parent b449c1e0d0
commit effa00cc75

View File

@@ -342,7 +342,7 @@ for x in $selected_configs; do
# backup location. Using the -c flag instead of -p tells it that there
# is an identical subvolume to the old snapshot at the receiving
# location where it can get its data. This helps speed up the transfer.
btrfs send "$new_snap" -c "$old_snap" | $ssh btrfs receive "$backup_location"
btrfs send -c "$old_snap" "$new_snap" | $ssh btrfs receive "$backup_location"
printf "Deleting old snapshot for $x...\n" | tee $PIPE
snapper -c "$x" delete "$old_num"
fi