Giter VIP home page Giter VIP logo

Comments (9)

digint avatar digint commented on May 23, 2024

This should work. The important thing is that the received_uuid on the backup side must point to the original subvolume (on the source host, NOT the one on the USB disk). You can check this with btrfs subvolume show <subvol>.

Note that kernels >=4.1 have a bug when re-sending subvolumes, see this thread:
http://thread.gmane.org/gmane.comp.file-systems.btrfs/48798
This patch is scheduled for the 4.4 kernel.

So if you have one of these kernels, the received_uuid will probably point to the subvolume on your USB disk, loosing the original relationship.

If this is the case, I'm afraid you'll have to patch your kernel with the patch provided in the thread mentioned above (works fine, I used it for 4.2.x and 4.3).

from btrbk.

ktims avatar ktims commented on May 23, 2024

So I tried this today, and it looks like doing a send / received from the USB HDD to the target btrfs volume causes the critical received_uuid to be changed to the UUID of the USB HDD subvolume. Trying to figure out if there's a way around that.

from btrbk.

ktims avatar ktims commented on May 23, 2024

I just realized I'm being incredibly stupid here. I used btrfs send and then 'received' the filesystem on the USB disk's btrfs. I should have just saved the output of btrfs send to a file and replayed that on the server. D'oh. Will go through the motions again... that will work, I'm sure of it. Thanks.

from btrbk.

digint avatar digint commented on May 23, 2024

Yes that will work, and would be the real "sneakernet" approach :)

from btrbk.

williamstlr avatar williamstlr commented on May 23, 2024

@ktims Would you mind detailing your process here? I'm very interesting in doing this myself. Thanks

from btrbk.

digint avatar digint commented on May 23, 2024

Just wrote a FAQ entry on this topic. Hope it helps!

https://github.com/digint/btrbk/blob/master/doc/FAQ.md#what-is-the-most-efficient-way-to-clone-btrfs-storage

Feel free to comment!

from btrbk.

williamstlr avatar williamstlr commented on May 23, 2024

Fantastic. Thank you very much. So after transferring subvolumes to my removable storage and receiving them on the remote side, how do I link the subvolume that is now on the remote side with btrbk so that it will continue to make incremental backups to the remote site?

from btrbk.

digint avatar digint commented on May 23, 2024

No need to link anything, btrfs has already done that for you. Just point your target to the location where you restored the streams. For the examples in the FAQ this would then be something like:

volume /source
  subvolume subvolX
    target send-receive ssh://backup-host.tld/target

btrbk will find the restored subvolumes there, and take them into account for incremental backups (no matter of the subvolume names, btrfs keeps track of the source in the "received_uuid").

If you want to be certain, run btrbk -l debug dryrun, and grep for "Latest common snapshots for: /source/subvolX ...".

from btrbk.

williamstlr avatar williamstlr commented on May 23, 2024

Awesome. Thanks

from btrbk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.