# samba shadow copy



## dillee1 (May 25, 2009)

Hello,
Has anyone sucessfully got samba shadow copy service running on FreeBSD? I know Linux-LVM-XFS and FreeBSD-ZFS has some success. Is it possible to get it work with UFS2 snapshot feature? Thank you.


----------



## tsarya (Jan 14, 2010)

I've tried to use this module but without success...
I followed the instruction from the vfs_shadow_copy2 man page which comes with samba but for some reason samba does not see the UFS2 snapshots... probably I am not doing something right 

Here is the part of the smb.conf to enable the shadow copy module:
...

```
[homes]
   ...
   vfs objects = shadow_copy2
   shadow:snapdir = /home/snaphots
   shadow:basedir = /home
```
Here is the disk layout:

```
/dev/ad0s1a on / (ufs, local, acls)
devfs on /dev (devfs, local, multilabel)
/dev/ad0s1d on /home (ufs, local, soft-updates, acls)
```

The snapshots are created as described in the freebsd handbook.

I have to mention that I haven't mounted them as a memory disk since I don't see the point of doing this manually or even in cron, coz for me samba has to do it automatically...

What bothers me is this part of the vfs_shadow_copy2 man page:
...


> Filesystem snapshots must be mounted on specially named directories in order to be recognized by vfs_shadow_copy2. The snapshot mount points must be immediate children of a the directory being shared. The snapshot naming convention is @GMT-YYYY.MM.DD-hh.mm.ss, where:
> 
> o   YYYY is the 4 digit year
> 
> ...


...

I don't know exactly how to make these mounts... Any help will be greatly appreciated


----------



## Nawunk (Jan 13, 2011)

I've given it a go and it doesn't seem to work for me either. Any tips from someone who has this running?


----------



## Weaseal (Feb 24, 2011)

I'm highly interested in this too but have not yet had much success.  If someone gets it working, a comprehensive guide would be fantastic, and earn you a beer.


----------



## Weaseal (Feb 24, 2011)

tsarya said:
			
		

> I've tried to use this module but without success...
> I followed the instruction from the vfs_shadow_copy2 man page which comes with samba but for some reason samba does not see the UFS2 snapshots... probably I am not doing something right


I don't think it supports UFS (I could be wrong).  I believe it requires ZFS.


----------



## Nawunk (Feb 25, 2011)

Weaseal said:
			
		

> I believe it requires ZFS.



I'm not even sure about that. I've since tried it on ZFS and couldn't manage to get that working either. The only examples of it working I could find on the net were for solaris, I couldn't find anything on FreeBSD.


----------



## acheron (Feb 27, 2011)

I could get it to work with ZFS and a patch found in the following blog http://www.edplese.com/blog/2009/12/02/samba-shadow_copy2-enhancements/


----------

