[Samba] Does samba have the ability to specify a backup location for files that are replaced/overwritten?

Andrea Venturoli ml at netfence.it
Mon Mar 21 07:19:03 UTC 2022


On 3/21/22 03:38, Anchal Nigam via samba wrote:

> My thought is, when a samba client writes a file through samba, the samba
> server knows if the file exists or not. So, at that point, if it could
> either create a backup of the file it is overwriting OR somehow use hard
> links, then you would always have instant backups. This way you'd always
> have instant backups.

The closest thing that comes to mind is vfs_recycle.
AFAIK it only saves a file when it's deleted, not modified, but perhaps 
it could be a starting point if you have some developer skills.



> Imagine a client machine is hit with ransomware that starts encrypting
> files on the samba share. With a feature like this you'd still have backups
> on the samba server that the ransomware couldn't get to.

Not exactly what you asked, but I keep frequent ZFS snapshots.

  bye
	av.



More information about the samba mailing list