linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chen Yang <chenyang.fnst@cn.fujitsu.com>
To: Adam Ryczkowski <adam.ryczkowski@statystyka.net>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: Is it possible to use send & receive features to clone the btrfs partition efficiently (including all snapshots inside)?
Date: Mon, 04 Feb 2013 09:12:04 +0800	[thread overview]
Message-ID: <510F0AE4.4070608@cn.fujitsu.com> (raw)
In-Reply-To: <510E6714.7040206@statystyka.net>

> It is very difficult for me to find any good documentation on send & receive commands. Event the most recent btrfs progs man page (accessed from git today) says nothing.
> 
> I want to migrate data (including numerous read only snaphots) from linux-raid - based storage into a native raid btrfs.
> 
> I think that cloning via send & receive is a viable option.
> 
> Can anyone help me please? I've posted my question also on stackexchange: http://unix.stackexchange.com/questions/63528/how-to-clone-btrfs-filesystem-into-different-medium-preserving-snapshots-sharin . I will post the answer there, so everyone can benefit from it.
> 
> Thank you,
> 
> Adam Ryczkowski
> +48505919892 <callto:+48505919892>
> Skype:sisteczko <skype:sisteczko>
> 
> -- 
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

usage: btrfs send [-v] [-i <subvol>] [-p <parent>] [-f <outfile>] <subvol>

    Send the subvolume to stdout.

    Sends the subvolume specified by <subvol> to stdout.
    By default, this will send the whole subvolume. To do
    an incremental send, one or multiple '-i <clone_source>'
    arguments have to be specified. A 'clone source' is
    a subvolume that is known to exist on the receiving
    side in exactly the same state as on the sending side.

    Normally, a good snapshot parent is searched automatically
    in the list of 'clone sources'. To override this, use
    '-p <parent>' to manually specify a snapshot parent.
    A manually specified snapshot parent is also regarded
    as 'clone source'.

    -v               Enable verbose debug output. Each
                     occurrence of this option increases the
                     verbose level more.
    -i <subvol>      Informs btrfs send that this subvolume,
                     can be taken as 'clone source'. This can
                     be used for incremental sends.
    -p <subvol>      Disable automatic snapshot parent
                     determination and use <subvol> as parent.
                     This subvolume is also added to the list
                     of 'clone sources' (see -i).
    -f <outfile>     Output is normally written to stdout.
                     To write to a file, use this option.
                     An alternative would be to use pipes.


usage: btrfs receive [-v] [-f <infile>] <mount>

    Receive subvolumes from stdin.

    Receives one or more subvolumes that were previously 
    sent with btrfs send. The received subvolumes are stored
    into <mount>.
    btrfs receive will fail in case a receiving subvolume
    already exists. It will also fail in case a previously
    received subvolume was changed after it was received.
    After receiving a subvolume, it is immediately set to
    read only.

    -v               Enable verbose debug output. Each
                     occurrence of this option increases the
                     verbose level more.
    -f <infile>      By default, btrfs receive uses stdin
                     to receive the subvolumes. Use this
                     option to specify a file to use instead.

  reply	other threads:[~2013-02-04  1:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-03 13:33 Is it possible to use send & receive features to clone the btrfs partition efficiently (including all snapshots inside)? Adam Ryczkowski
2013-02-04  1:12 ` Chen Yang [this message]
2013-02-16 22:07   ` Why does "btrfs send /mnt/btrfs-root" fail with "ERROR: /mnt/btrfs-root is not read-only." even when mounted with option "ro"? Adam Ryczkowski
2013-02-16 22:17     ` Hugo Mills
2013-02-16 23:14       ` How to clone btrfs partition? Adam Ryczkowski
2013-02-16 23:13         ` Hugo Mills

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=510F0AE4.4070608@cn.fujitsu.com \
    --to=chenyang.fnst@cn.fujitsu.com \
    --cc=adam.ryczkowski@statystyka.net \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).