Automatically purge files on a volume with ZENworks for Servers
Novell Cool Solutions: Tip
By Rick Cox
Digg This -
Posted: 23 Feb 2000
The ZENworks for Servers (ZfS) Script policy adds functionality to ZfS with NCF files, Perl scripts, and NetBasic scripts. Using an NCF file and a useful Novell tool, Toolbox, you can automate volume purges on any server managed by ZfS.
A ZfS Policy Package is associated to Servers, Server Groups, and/or Organizational Units. This allows one policy to affect many servers.
Using the policy schedule, you can automate volume purges nightly, weekly, monthly, or on any schedule.
Use this Cool Solution as a launching pad and customize a script to purge files with your parameters.
Here are two sample scripts; either will purge all files on a given volume (in this case SYS).
The purge command for Toolbox v 2.11 requires a username/password, while Toolbox ver 1.09d does not require authorization. Toolbox v 2.11 requires that the password of an authorized user be put in the script (which is in the clear for any user authorized to view the policy package). Choose the version that meets your needs.
This is the script to purge files on volume sys with toolbox version 1.09d. The time command is just a delay to allow the toolbox to load prior to the purge command. The 2.11 version of toolbox does not need this delay:
And the script if you prefer toolbox ver 211:
The below schedule will run the script every Sunday between 8:00 pm and 10:00 pm. The script would run at 8:00 if ZfS were running at 8:00. If a server went down at 7:30 on Sunday evening and came back up at 9:15, the policy would run as soon as the server was available.
Some users will prefer having a clear text in the policy package vs. allowing any user with console access to purge all files on a server. If you need two versions of Toolbox on a server, just rename one version (perhaps to Toolbox109.NLM). Then modify your script to load Toolbox109.
This solution is provided as a tip, and has not been tested by Novell, Inc.. Please test in your test lab in your environment.
The Toolbox download page carries the following note: This utility helps system administrators and developers. It is provided free of charge as a courtesy, and therefore, is not a Novell supported product. Problems or questions regarding this product can be reported via e-mail to NTSUTIL@NOVELL.COM.
This script assumes that you have Toolbox on the SYS:SYSTEM directory. You can download both of the versions we mentioned via the TIDs below:
Rick Cox is the Product Manager of ZENworks for Servers and ManageWise. He has been with Novell since 1987, with a brief leave while he was with Compaq. He began his career at WordPerfect. Over his fourteen years in the industry he has worked in Customer Support, IS&T, R & D Lab manager, Developer Relations, Fibre Channel development, and Product Management.
Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com