-
Notifications
You must be signed in to change notification settings - Fork 57
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
Correct approach to sync full tree of zfs #210
Comments
Errrr...
some of those filesystems are a waste of time and space to back up. Example:
var crash
var tmp
tmp
usr/ports
Usually, best practices are to have ONE filesystem with stuff you actually
care about, and then keep a config of settings for the system.
This gives you the advantage that when and if you have a full system
meltdown, you can then rebuild a newer OS installation cleanly... then just
restore /home.
…On Tue, Dec 10, 2024 at 5:24 AM Пётр ***@***.***> wrote:
I would like to create a script to sync the full tree of all zfs
filesystems of a newly installed FreeBSD.
The list of the filesystems is as follows:
zroot
zroot/ROOT
zroot/ROOT/default
zroot/home
zroot/home/peter
zroot/tmp
zroot/usr
zroot/usr/ports
zroot/usr/src
zroot/var
zroot/var/audit
zroot/var/crash
zroot/var/log
zroot/var/mail
zroot/var/tmp
Another filesystems could be created during install or after it (for
example, zroot/home/<user> or zroot/ROOT/default/<update>). The existing
zrep configuration should continue to work in such case, only new
filesystems need to be added to the sync list.
As I understand, the recursive replication is not reliable, the
filesystems should be synced one-by-one. As I mentioned in #166
<#166>, zrep data is propagated to
the child filesystems, so the only approach would be ZREPTAG defined
separately for EVERY filesystem to sync. It looks a bit hard to manage and
snapshot deletion needs to be debugged/validated, so I would like to ask if
any other approach looks possible before starting developing this solution.
—
Reply to this email directly, view it on GitHub
<#210>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AANEV6JPLHOA3P4MJIQK7TL2E3TRHAVCNFSM6AAAAABTLFDMJ2VHI2DSMVQWIX3LMV43ASLTON2WKOZSG4ZTAMJRHAYTGOI>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
PS:
I would imagine that doing a "zrep -R" type backup of /home should work
okay.
Dont have a separate one for /home/peter, and everything should be good I
think?
…On Tue, Dec 10, 2024 at 5:49 AM Philip Brown ***@***.***> wrote:
Errrr...
some of those filesystems are a waste of time and space to back up.
Example:
var crash
var tmp
tmp
usr/ports
Usually, best practices are to have ONE filesystem with stuff you actually
care about, and then keep a config of settings for the system.
This gives you the advantage that when and if you have a full system
meltdown, you can then rebuild a newer OS installation cleanly... then just
restore /home.
On Tue, Dec 10, 2024 at 5:24 AM Пётр ***@***.***> wrote:
> I would like to create a script to sync the full tree of all zfs
> filesystems of a newly installed FreeBSD.
>
> The list of the filesystems is as follows:
>
> zroot
> zroot/ROOT
> zroot/ROOT/default
> zroot/home
> zroot/home/peter
> zroot/tmp
> zroot/usr
> zroot/usr/ports
> zroot/usr/src
> zroot/var
> zroot/var/audit
> zroot/var/crash
> zroot/var/log
> zroot/var/mail
> zroot/var/tmp
>
> Another filesystems could be created during install or after it (for
> example, zroot/home/<user> or zroot/ROOT/default/<update>). The existing
> zrep configuration should continue to work in such case, only new
> filesystems need to be added to the sync list.
>
> As I understand, the recursive replication is not reliable, the
> filesystems should be synced one-by-one. As I mentioned in #166
> <#166>, zrep data is propagated
> to the child filesystems, so the only approach would be ZREPTAG defined
> separately for EVERY filesystem to sync. It looks a bit hard to manage and
> snapshot deletion needs to be debugged/validated, so I would like to ask if
> any other approach looks possible before starting developing this solution.
>
> —
> Reply to this email directly, view it on GitHub
> <#210>, or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AANEV6JPLHOA3P4MJIQK7TL2E3TRHAVCNFSM6AAAAABTLFDMJ2VHI2DSMVQWIX3LMV43ASLTON2WKOZSG4ZTAMJRHAYTGOI>
> .
> You are receiving this because you are subscribed to this thread.Message
> ID: ***@***.***>
>
|
Sure, I don't plan to sync (for example)
To accelerate recovery, it would be nice to be able to back-sync most of filesystems. Like this, one can just boot a live-system on a VM with minimal system installed (for example, VM created from a template) and sync remote data to them. A simple script permits to restore the whole VM very fast (only the network is the bottleneck).
Since 14.1 (?) there are one ZFS dataset per user and one dataset for Anyway, I can imagine another root dataset, for example |
sorry for the ambiguity: I just meant "dont have a separate zrep call
for /home/peter".
I think that backing up homedirs like that is exactly what I
originally added the -R feature for, many years ago :)
|
As you've mentioned in #165
...I don't try to use -R following your recommendations ;) |
fair enough... :) but in this specific case, I would recommend you try it
out just for /home
Unless you really want to do the "back up ALL filesystems in one go" thing.
Even though it is wasteful.
In which case, you would only want to do the top level.
But.. this would be experimental, and you should do lots of use-case
testing, and not rely on it 100%
…On Tue, Dec 10, 2024 at 8:33 AM Пётр ***@***.***> wrote:
As you've mentioned in #165 <#165>
yeah... Im not happy with the way things work.... but zrep depends on ZFS.
and recursive syncs with ZFS are.... tricky.
I always recommend that people do syncs individually, not recursive,
whenever possible.
...I don't try to use -R following your recommendations ;)
—
Reply to this email directly, view it on GitHub
<#210 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AANEV6IMRAZRM2Z4K5WAUHL2E4JVRAVCNFSM6AAAAABTLFDMJ2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMZSGIZDSNJUGY>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
I would like to create a script to sync the full tree of all zfs filesystems of a newly installed FreeBSD.
The list of the filesystems is as follows:
Another filesystems could be created during install or after it (for example,
zroot/home/<user>
orzroot/ROOT/default/<update>
). The existing zrep configuration should continue to work in such case, only new filesystems need to be added to the sync list.As I understand, the recursive replication is not reliable, the filesystems should be synced one-by-one. As I mentioned in #166, zrep data is propagated to the child filesystems, so the only approach would be ZREPTAG defined separately for EVERY filesystem to sync. It looks a bit hard to manage and snapshot deletion needs to be debugged/validated, so I would like to ask if any other approach looks possible before starting developing this solution.
The text was updated successfully, but these errors were encountered: