SHIFT

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

User Tools

Site Tools


automaticpurgenetware
Differences

This shows you the differences between two versions of the page.

Link to this comparison view

automaticpurgenetware [2013/05/12 09:38] (current)
sjoerd created
Line 1: Line 1:
 += 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 ==
 +<​code>​
 +# 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 ***
 +</​code>​
 +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:
 +<​code>​
 +Auth <​TREENAME>​ <​.admin.context>​
 +Auth SAVE
 +</​code>​
 +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 ==
 +[[http://​www.novell.com/​communities/​node/​260/​toolbox+nlm+2+17+netware+4+6|toolbox]] \\
 +[[http://​www.novell.com/​communities/​node/​529/​cron+nlm+server+utility+1+7|cron]] \\ 
 +
 +{{tag>​netware}}
automaticpurgenetware.txt ยท Last modified: 2013/05/12 09:38 by sjoerd