On Tue, Aug 8, 2017 at 10:32 PM, <siranee.ja@xxxxxxxxx> wrote: > Hi btrfs support team, > > My name is siranee jaraswachirakul. I tested btrfs incremental send and receive and > I found something incorrect. > > I posted detail in the url > http://www.linuxquestions.org/questions/showthread.php?p=5746238#post5746238 > > Could you please help me to find the reason? The command "btrfs sub snap mysql_201707210830 mysql" is unexpected for two reasons: 1. This is a rw snapshot. It needs to be ro using -r flag to make it ro, and only ro snapshots can be used with btrfs send receive. 2. The naming convention seems reversed. The subvolume you're snapshotting should be first, and the resulting snapshot is second, and it is the second one that you'll send. So I think really what you'll end up wanting is: Machine A btrfs sub snap -r mysql mysql_20170721 btrfs send mysql_20170721 Machine B btrfs sub snap mysql_20170721 mysql That will make a rw snapshot from the ro snapshot. The next problem with the post is that you say "incremental" but I do not see the exact send receive command you're using. An incremental send requires -p option. Machine A btrfs sub snap -r mysql mysql_20170721 btrfs send mysql_20170721 Machine B btrfs sub snap mysql_20170721 mysql Test mysql btrfs sub del mysql Machine A (next day) Machine A btrfs sub snap -r mysql mysql_20170722 btrfs send -p mysql_20170721 mysql_20170722 Machine B btrfs sub snap mysql_20170722 mysql Test mysql btrfs sub del mysql And so on. You must have the -p snapshot on both file systems for the incremental send/receive to work. -- Chris Murphy -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
