File Versioning

Status
Not open for further replies.

vertigo262

Cadet
Joined
Oct 22, 2011
Messages
7
Hi,

I was wondering if there was a way for freenas to do file versioning

Right now we are doing nightly backups, but it would be nice to have a level of file redundancy within the nas itself.

Snapshots are nice but it does the whole volume.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
So compartmentalize the stuff you want versioned into a ZFS dataset and snapshot it frequently. The snapshot stuff is neatly integrated with CIFS so that Windows clients can see the snapshots, which is really nice if you go that route.
 

vertigo262

Cadet
Joined
Oct 22, 2011
Messages
7
Yes but the snapshot will go and restores a whole volume, and not a specific file correct? plus, I would think daily snapshots could be very large instead of specific files
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
No, snapshots don't "restore" anything. They take a picture of a filesystem at a given moment, essentially freezing the filesystem view and contents. If you go to the snapshot and look around, the files within are the files that existed at that moment. In the meantime, the live, "current" filesystem may be different, having different content and changes. This happens because ZFS keeps track of it all. If there are zero changes between one snapshot and another, there is no (major) extra space consumed. If you go and make 100MB of changes to a current file, then the newer snapshot is 100MB large, because those blocks are unique to that snapshot.

If you are generally only adding new files to an existing volume, you would find that snapshots take up almost zero space.

If you are actively making major changes to files on an ongoing basis, that means that ZFS has to maintain both the old and the new data. That means snapshots for that require more space.
 
Status
Not open for further replies.
Top