Page 1 of 1
send snapshot to changed directory

Posted:
Wed May 29, 2024 3:38 am
by Sonic
on my pools, I needed to create a directory and put all my files into that directory. So, it changed from pool/dataset/files/files2/etc... to pool/dataset/new directory/files/files2/etc...
Now I'd like to send a snapshot to my remote backup machine. Is it possible to tell the remote machine that the directory of the files changed? Or do I have to copy all files over again?
Thanks for any insight:-)
Re: send snapshot to changed directory

Posted:
Thu May 30, 2024 4:28 pm
by Sharko
Sonic: I don't think that you need to do anything special. Moving the files into the intermediate directory will change some metadata associated with the files, but the files themselves are still comprised of the same blocks. So the replication process will unavoidably require that the changed metadata blocks get sent over the wire, but the bulk of the blocks associated with the files (the blocks that actually hold the data) hasn't changed. I'm pretty sure that this how it works.
Re: send snapshot to changed directory

Posted:
Sat Oct 12, 2024 11:33 am
by Sonic
I really just checked that today and you are absolutely right. There was no need to do anything, the new directory is created by itself and the files get moved into it.
Thanks very much, Sharko!
Re: send snapshot to changed directory

Posted:
Sun Oct 13, 2024 12:52 am
by gea
A ZFS snapshot is a view to the whole filesystem at snapshot creation time.
As snaps are based on the former states of ZFS datablocks in a Copy on Write filesystem, no copy action is involved to create ZFS snaps.