# Does FreeBSD store any previous versions of files?



## brandonb (May 12, 2014)

Basically, like Windows has Shadow files, does FreeBSD have anything similar? A user running a Windows machine had a drive mapped to their computer that was on a FreeBSD machine, and they got the CryptoLocker virus on their machine. The virus didn't infect the FreeBSD machine, but it did encrypt some of the files. Is there any way to restore the files to previous versions?


----------



## kpa (May 12, 2014)

If you use ZFS you have snapshots that can be used to restore previous versions of files. UFS has similar but more limited snapshots. The only BSD system that I know of that has a kind of versioning on files that you're asking is DragonFlyBSD with its HAMMER filesystem.


----------



## wblock@ (May 12, 2014)

sysutils/rsnapshot will do that.  But it can't help with files that were corrupted before it was installed.  (ISTR there was something about a bug in that virus which allowed easy decryption for some files.)


----------



## brandonb (May 12, 2014)

wblock@ said:
			
		

> sysutils/rsnapshot will do that.  But it can't help with files that were corrupted before it was installed.  (ISTR there was something about a bug in that virus which allowed easy decryption for some files.)


Thank you.
The machine was infected too recently to have the flaw for easy decryption. The creator of the virus became aware of it and updated the virus to not have the flaw as of April 1 of this year.


----------

