Giter VIP home page Giter VIP logo

Comments (8)

masc3d avatar masc3d commented on May 24, 2024

I don't see how this would make sense, but maybe it's a misunderstanding in terminology. Could you please describe a specific use case?

from btrfs-sxbackup.

omfdzg avatar omfdzg commented on May 24, 2024

sure, I have multiple btrfs filesystems/subvolumes on my source server

btrfs fi show
Label: 'root' uuid: 672826ad-18c2-415f-ae8e-2ec513b2fb55
Total devices 1 FS bytes used 18.32GiB
Label: 'pool' uuid: 9d2d24ff-ee67-4034-8671-3c9ffcc6c17a
Total devices 2 FS bytes used 6.98TiB
Label: 'bpool' uuid: d41b77ba-d56c-4a91-8320-21a347505ff5
Total devices 1 FS bytes used 3.15TiB

each of this filesystems , contain multiple subvolumes, for example by default root subvolume contain @ and @home
I would like to backup each of these subvolumes to alternate server

btrfs-sxbackup init / ssh://[email protected]:/backup
INFO preparing source and destination environment
INFO source :: url [/] container [.sxbackup/] retention [3] compress [False]
INFO destination :: url [ssh://[email protected]:/backup/] retention [2d: 1/d, 2w:3/w, 1m:1/w, 2m:none] compress [False]
INFO initialized successfully

not as lucky with another subvolume

btrfs-sxbackup init /home ssh://[email protected]:/backup
INFO btrfs-sxbackup v0.6.10
ERROR destination is already initialized

from btrfs-sxbackup.

masc3d avatar masc3d commented on May 24, 2024

Btrfs cannot send/receive nested subvolumes..
https://wiki.archlinux.org/index.php/Btrfs#Snapshots

Note: Snapshots are not recursive. Every nested subvolume will be an empty directory inside the snapshot.

from btrfs-sxbackup.

digitalcircuit avatar digitalcircuit commented on May 24, 2024

@masc3d It allows making snapshots of home separately from the entire system. I'm not sure if that's the best reason, but it's worthwhile noting that @ and @home is Ubuntu's default BTRFS layout for the root disk.

I didn't think of trying btrfs-sxbackup on the root volume, I've just backed up @ and @home separately.

Rough default of /etc/fstab in an Ubuntu 16.04 installation, names aside:

/dev/mapper/system_ssd-root /               btrfs   defaults,subvol=@,[...]
/dev/mapper/system_ssd-root /home           btrfs   defaults,subvol=@home,[...]

from btrfs-sxbackup.

masc3d avatar masc3d commented on May 24, 2024

yes, I actually removed my question, as I presumed you will have a good reason to have the split.

you can backup both to the same destination filesystem, but not the same destination subvolume.
for your setup this would probably work:

btrfs-sxbackup init / ssh://[email protected]:/backup
btrfs-sxbackup init /home ssh://[email protected]:/backup-home

the destination subvolumes will be created automatically.

from btrfs-sxbackup.

masc3d avatar masc3d commented on May 24, 2024

of course you could also have some nested subvolumes on the destination for sturcturing like /backup/root /backup/home.

But each source subvolume requires a dedicated destination subvolume for backup.

from btrfs-sxbackup.

omfdzg avatar omfdzg commented on May 24, 2024

Oh, my bad, yes with nested subvolumes your script works great.
Thank you!

from btrfs-sxbackup.

masc3d avatar masc3d commented on May 24, 2024

you're welcome )

from btrfs-sxbackup.

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.