PATCH: Extended recycle bin for head

Juergen Hasch Hasch at t-online.de
Fri May 3 07:36:02 GMT 2002


Hi,

this is an extension to the recycle bin VFS module for head. It adds serveral 
options to the recycle bin, like the ability to preserve the original file 
tree and touching the access date for automatic removal of old files.

The patch needs the cascaded-vfs and vfs-options patch from Alexander Bokovoy 
to work. It works well for me, however one thing hasn't been resolved:

The new vfs-options parameters don't work with [homes]. I have a patch for 
this (patch.loadparm), however this adds a new entry to the service struct.
Is there another way to find out if a service has been created from [homes] ?

...Juergen
---------------------------------------------
Options for recycle bin:
name
	name of the recycle bin at root level of the share
	e.g. .recyle

mode	
	KEEP_DIRECTORIES = retain directory hierarchy of deleted file,
	NOVERSIONS = don't create several versions of file in recycle bin
	TOUCH = touch access date when moving to recycle bin. This enables
	the use of automatic cleanup scripts in the recycle directory

maxsize
	maximum size of files to be moved to recycle bin, -1 moves files
	of any size to recycle bin.

exclude
	exclude files with given extension from moving to recycle bin.
	Useful for temporary files.

excludedir
	exclude directories from recycle bin, useful for /temp.

noversions
	don't create versions of files with the given extension in the recycle bin
	e.g.	mytext.doc
		Copy #1 of mytext.doc
		Copy #2 of mytext.doc
	Useful for Microsoft Office files

Example smb.conf:

[homes]
        comment = Home-directory
        path = /home/%u
        read only = No
        create mask = 0750
        vfs object = /usr/lib/samba/recycle.so
recycle: recylce_bin = .recycle
recycle: mode = KEEP_DIRECTORIES|NOVERSIONS|TOUCH
recycle: maxsize = 10000000
recycle: exclude = .tmp|.temp|.o|.obj
recycle: exclude_dir = /tmp|/temp|/cache
recycle: noversions = .doc|.xls|.ppt

[data]
        comment = Data share
        path = /data
        read only = No
        create mask = 0750
        vfs object = /usr/lib/samba/recycle.so
recycle: recylce_bin = .recycle
recycle: exclude = .tmp|.temp|.o|.obj
recycle: mode = TOUCH
-------------- next part --------------
A non-text attachment was scrubbed...
Name: recycle.patch1
Type: text/x-diff
Size: 11973 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20020503/98f56066/recycle.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: loadparm.patch
Type: text/x-diff
Size: 2909 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20020503/98f56066/loadparm.bin


More information about the samba-technical mailing list