[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-fs
Subject:    Re:  Restore only several files from ZFS snapshot without creating copy of them?
From:       Bob Friesenhahn <bfriesen () simple ! dallas ! tx ! us>
Date:       2016-01-11 23:44:17
Message-ID: alpine.GSO.2.01.1601111739350.2727 () freddy ! simplesystems ! org
[Download RAW message or body]

On Mon, 11 Jan 2016, kpneal@pobox.com wrote:
>>
>> The rock is somewhat softer than that.  All that is needed to remove
>> most of the duplication is a file copy program which operates at the
>> filesystem blocksize (e.g. 128k) and only copies blocks for existing
>> files if the data in that block has changed.
>>
>> Absent writing a dedicated copy program, rsync with options '-a
>> --inplace --no-whole-file' comes close to copying the file without
>> duplication since it compares blocks and only writes changed blocks
>> (but not necessarily aligned to zfs blocks).
>
> I don't think that will work to restore files from snapshots as snapshots
> appear as different filesystems to applications if I'm not mistaken. That's
> also why using "ln" to create a hard link won't work. Unless I'm mistaken.

Rsync just copies files from one location to another, and/or tries 
make the copy as similar to the original with minimal work.  It is 
easy to rsync from a snapshot (from 
/filesystem/.zfs/snapshot/snapshotname).

If there have been large changes to the file and there are 
intermediate snapshots, then even using rsync with '--inplace 
--no-whole-file' will still result in losing the space attributed to 
those intermediate snapshots.

Bob
-- 
Bob Friesenhahn
bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
_______________________________________________
freebsd-fs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-fs
To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org"
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic