-
-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
zfs-rsync command? #114
Comments
I would love to have a "more like rsync" tool for migration purposes in addition to the zfs_autobackup for backups. Currently I have my own script for such cases, but a "properly maintained" solution would definitely be better. To me the above looks good, with a few comments/opinions/ideas:
|
thanks for the reply! i agree with your points, i think they already fall somewhat on the above mentioned extra options:
but indeed, sending the current data over should be easy and not require too many options or thinking |
I'd be interested in making it as close to mirroring everything as possible:
One hack I've been considering for achieving this to mirror a pool to rotating offsite drives is
This gives you robust (at least from no external tools to maintain) and exact mirror of the pool, but the con is you have a permanent warning about being degraded state. Reference: https://serverfault.com/a/641217 additional aside...almost wonder if you could do the offline/online sync to remote servers as well using a network block device or similar https://unix.stackexchange.com/questions/119364/how-can-i-mount-a-block-device-from-one-computer-to-another-via-the-network-as-a |
ha! did i read that idea of changing disk on reddit r/zfs? i wanted to mention zfs-autobackup but i dont want to be too spammy with it :) |
indeed, i forgot to menation the --delete or --destroy option that will indeed delete missing stuff. again, just like rsync, which is one of my all time favorite cli tools :) |
i also agree it should be fairly easy to use it to make a close-as-possible mirror. you could go one step (option) further and have it sync over changed properties as well. (not just the first time, like zfs-autobackup does) |
I don't think I saw the reddit thread, have a link? So I can learn all the grave warnings for why to not do it 😅
|
sorry cant find it anymore :( but if you google you can find more persons that tried to do this. i think its fairely ok, but a zfs-rsync would indeed allow you do to it offsite. |
any thoughts on bi-directional-ish zfs-rsync? ...zfs-syncthing? Tangentially on topic... I'm currently testing on 3 VMs simulating 1 server, 2 workstations (root@golden-image1, root@golden-image2) Loop this on server
Thinning schedule just for testing purposes. Dumbly pushing and pulling data from the workstations. Scenario of me as a single user having multiple PCs and laptops, keeping some datasets in sync. e.g.
Timing it. When no changes it takes some time to analyze and exit. (aside: curious what causes analysis to be "slow")
I can make a change to any dataset on any workstation and it takes minimum ~30sec to make it around everywhere (or sometimes it has to loop twice to deal with thinning). The "min-change 1" is key to this working. Could probably make the (push, pull) per workstation in parallel to make it tight and not grow with increasing nodes. Not seeing any conflicts because only editing files on one workstation at a time. Even with the datasets mounted in all places (atime=false in case concurrent browsing causes a change). Can do things like take a laptop offline offsite and automatically push back changes later. If I intentionally make a conflict writing to two workstations within 1 minute, nothing explodes, I see the error and just rollback and/or copy the change manually. In practice I might assume responsibility for only one workstation "checking out" the dataset at a time with a read/write mount. Could be some potential to automatically detect conflicts, rollback/resolve, and rsync conflicting changes to the server. Or maybe more robust and seamless a fuse driver and locking mechanism to ensure consistent replication always... z(c)luster?? |
From my comment here #113 (comment) something looking closer to rsync for zfs? |
Kind of what I was asking for in my discussion #270 . Using |
There are some requests for making zfs-autobackup behave more like an rsync, and i agree. However i think it will be another command, which offcourse uses the same codebase but has some different parameters and features.
Please help in discussing what such a tool should and shouldn't do.
To compare, first we start with the features of
zfs-autobackup
with its default settings:A tool like
zfs-rsync
, should perhaps have these features with its default settings:zfs-rsync SRC [SRC]... DEST
zfs-rsync pool/source1/ targetpool/target
, results in pool/source1 -> targetpool/targetzfs-rsync pool/source1 targetpool/target
, results in pool/source1 -> targetpool/target/source1zfs-rsync --ssh-target server2 pool1 pool2 /
-> sends over datasets under pool1 and pool2 to server2.More details and optional stuff for zfs-rsync:
user@host:/path
syntax?(regarding #41 and #113 )
The text was updated successfully, but these errors were encountered: