Restore only several files from ZFS snapshot without creating copy of them?

Paul Kraus paul at kraus-haus.org
Mon Jan 11 21:20:59 UTC 2016


On Jan 9, 2016, at 18:38, Lev Serebryakov <lev at FreeBSD.org> wrote:

> Hello FreeBSD,
> 
>   I have a ZFS filesystem, which have daily snapshots. User removed several
> multi-gigabyte files by accident and need to get them back. These files are
> present in old daily snapshots, allright. But as far as I understnad, if I
> do
> 
> cp /fs/.zfs/snapshots/old-snapshot/file /fs/file
> 
>   I got TWO copies of this file (one in live filesystem and future snapshots
> and other one in old snapshots). As files in question are multi-gigabyte
> (about 100G alltogether) I don't want such duplication (dedup is turned off,
> as it is very memory-consuming).
> 
> Is it possible to restore these files without such data duplication?

Could you leverage a CLONE of the snapshot until such time as other snapshots of these large files have expired (assuming you are expiring and destroying old snapshots after a certain amount of time) ? I am trying to think out of the box here and have to completely thought all this through. 

--
Paul Kraus
paul at kraus-haus.org



More information about the freebsd-fs mailing list