From effa00cc75d33a373f93c3eb642446b41ceb7506 Mon Sep 17 00:00:00 2001 From: "Wael M. Nasreddine" Date: Sun, 28 May 2017 23:05:06 -0700 Subject: [PATCH] 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 --- bin/snap-sync | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/snap-sync b/bin/snap-sync index e2a2564..57c9fe4 100755 --- a/bin/snap-sync +++ b/bin/snap-sync @@ -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