SHIFT

--- Sjoerd Hooft's InFormation Technology ---

User Tools

Site Tools


Sidebar

Sponsor:

Would you like to sponsor this site?
Or buy me a beer?:


Recently Changed Pages:

View All Pages
View All Q Pages


View All Tags


Sign up for Q to post comments.





WIKI Disclaimer: As with most other things on the Internet, the content on this wiki is not supported. It was contributed by me and is published “as is”. It has worked for me, and might work for you.
Also note that any view or statement expressed anywhere on this site are strictly mine and not the opinions or views of my employer.


Terms And Conditions for Q users


Pages with comments

PageDateDiscussionTags
2019/05/01 14:08 2 Comments
2019/03/15 16:02 1 Comment
2019/03/15 16:02 1 Comment
2019/03/15 16:02 3 Comments
2017/04/20 15:28 1 Comment
2017/04/20 15:23 1 Comment
2017/04/19 14:44 1 Comment
2017/04/17 20:10 1 Comment
2017/04/17 20:07 1 Comment
2017/04/17 19:58 1 Comment
2017/04/17 19:52 1 Comment

View All Comments

automaticpurgenetware

Automatic Purge Netware

Netware NSS volumes do not delete files during a delete. They are just flagged as deleted, and can be easily retrieved with salvage. Though this is quite nice, there is no automatic way to keep those files under control. You don't want your servers to become slow just to maintain files that were deleted years ago. Follow this guide to create a script that will just do that, and schedule it to run every night.

The Script

# Written by Sjoerd
# 2 june 2008
# sjoerd [@] warmetal.nl
# tested on Netware 6 - 6.5
# variables:
#    $SN : SERVERNAME
#    $VOL1: First volume after SYS
#    $VOL2: Second volume after SYS
#

#
# load toolbox for purge and echo to work
#
load toolbox

#
# load authentication for purge
# to use this you need an authentication file: tboxauth.dat
# see www.warmetal.nl on how to create this file
#
auth load

# Start script
echo *** Start Purge ***
echo " "
time
echo " "

echo Purging $SN/SYS
echo " "
purge $SN/SYS:deleted.sav /aqd=30
purge $SN/SYS: /aqd=30
echo Done purging $SN/SYS

echo Purging $SN/$VOL1
echo " "
purge $SN/$VOL1:deleted.sav /aqd=30
purge $SN/$VOL1: /aqd=30
echo Done purging $SN/$VOL1

echo Purging $SN/$VOL2
echo " "
purge $SN/$VOL2:deleted.sav /aqd=30
purge $SN/$VOL2: /aqd=30
echo Done purging $SN/$VOL2

echo " "
time
echo " "
echo *** Finished Purge ***

Of course it's possible to change the number of days, just change the d=30 switch to something more appropiate for you, and you can add more volumes, depending on your needs. If the script is running you can stop it by issuing <CTRL>+C on the console.

Authentication

To create the authentication file mentioned issue the following commands on the console:

Auth <TREENAME> <.admin.context>
Auth SAVE

This will create the encrypted file tboxauth.dat.

Schedule

You can schedule the command by using the built-in “Scheduled Tasks” within Netware Remote Manager:
scheduledtasks.jpg

Note that you'll have to schedule the command to run on a different time then your backup. Both are pretty demanding on your io.

Netware 5.1

The script is tested on Netware 5.1 but there is no build-in scheduler. You can still schedule it, but you'll have to use cron.

Resources

You could leave a comment if you were logged in.
automaticpurgenetware.txt · Last modified: 2013/05/12 09:38 by sjoerd