Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I automate a purge on all volumes for deleted 1

Status
Not open for further replies.

jdavis37

MIS
Jul 9, 2002
233
US
files? I'm using Novell 5x and I would like to setup some type of automate purge utility to run on all volumes.

thanks
 
Set the Purge (P) attribute on the entire volume. Deleted files are immediately purged. After you set this attribute, any files that are deleted are not recoverable.
 
You could also set up a CRON job and use TOOLBOX.nlm to purge on a scheduled basis.

I don't think CRON.NLM is packaged with NetWare, but you can download it from Novell's site. just search for cron.nlm. You can also download TOOLBOX.NLM from Novell.

Anyway, you setup cron so it is running all the time (put in autoexec), then setup the crontab file to schedule a purge via toolbox. easy deal.



Marvin Huffaker MCNE, CNE
Marvin Huffaker Consulting
 
Thanks,

I have a cron job setup to run other things. How would I set it to run the purge.nlm? Is there any documents out there to tell me how?

 
IT's not PURGE.NLM.. It's toolbox.nlm. Purge is one of the commands available through the toolbox.

If you load toolbox, it has very clear instruction on it's use. Just take the necessary commands and put into your crontab. In general it's &quot;PURGE <vol:> /a&quot; for the whole volume but you might want to customize t.

Marvin Huffaker MCNE, CNE
Marvin Huffaker Consulting
 
I'm sorry. I tried something like this. I can use novell purge.nlm in a cron job. I thought the cron jobs are only setup with an .ncf ext. Please help! Thanks!
 
Purge is a command that is built into TOOLBOX. it is not an NLM. Once you load TOOLBOX.NLM, you can type &quot;PURGE xxxxx&quot; from the command prompt to purge the volumes.

You can then automate the task by putting the commands in the CRON scheduler. The exact file location is SYS:ETC\CRONTAB

If you don't have a CRONTAB file already, you'll have to find some documentation that describes how to use it. You mentioned that you're already using it, so I assume you can duplicate some of the other entries for use with the purge command.

From novell documentation:

Description
CRON.NLM is adapted from the well-known Unix clock daemon. Cron runs all day, spending most of its time asleep. Once a minute it wakes up and reads SYS:\ETC\CRONTAB. Any commands scheduled in CRONTAB matching the current date and time are executed.

Cron records all actions in the log file SYS:\ETC\CRONLOG.

CRONTAB SYNTAX:
Each crontab entry has six fields, each separated by tabs or spaces:

minute, hour, day-of-month, month, day-of-week, command

Each entry is checked in turn, and any entry matching the current time is executed. The entry * matches anything. A pound sign (#) is a comment. Valid values are:

l minute(0-59)
l hour(0-23)
l day-of-month(1-31)
l month(1-12)
l day-of-week(0-6) Note: week starts with 0=Sunday

Examples:
l #Min Hr Dat Mo Day Command


l #print time every minute
* * * * * time


l #print volumes on the hour
0 * * * * volumes


l #do backup Mon-Fri at 0430
30 4 * * 1-5 load sbackup


l #Start Oracle database every morning at 7:00 a.m.
#Stop Oracle database every Sunday at 7:45 p.m.
0 7 * * * orastart
45 19 * * 0 orastop


l #Mon, Wed, Fri at 1930 down server
30 19 * * 1,3,5 down


l #Xmas morning at 0900 only
0 9 25 12 * load sing



Marvin Huffaker MCNE, CNE
Marvin Huffaker Consulting
 
Thanks,,,

I have one quick question..Again, thanks for being patience with me. How would I setup the following purge command in a crontab job? I loaded the toolbox.nlm already.

purge Testserver/sys: /a /d=07 8 0 * * su..sa

;;Above I'm trying to purge all files/directories on the sys volume every day and every day of the month at 8am. I also want to include the following:

purge Testserver/vol1: /a /d=07 10 0 * * su..sa

;;above on the same server I aslo want to schedule a purge command on vol1 for everyday and everyday of the month starting at 10am.

 
What is the difference from loading toolbox.nlm with the following:

toolbox.nlm /ns /nl

or

load toolbox
dir - which suppose to ask for authentication credentials? what is this?
 
I was able to create a mypurge.ncf file with the following information: purge sys:\*.* -a to start at 10am. I have toolbox loaded. When the mypurge.ncf file executed it abended my server with a authentication credentials. Is there anyway to avoid this?
 
First, your idea about using a MYPURGE.NCF is a good idea. Get all the parameters for the purge working in there correctly. You should be able to run MYPURGE from the command prompt and it should execute as planned with no problems. Work out any issues with that first. Then add MYPURGE.NCF to the Crontab file.

Your line in the CRONTAB is backwards.

Should be like:

0 8 * * * mypurge.ncf

All of the time/date options should be in numerical format. This example I just listed will make it go at 8am every day. I caution you to not run this during production hours. PURGE is typically a processor hog.

As far as the abend, not sure. Never had it abend before. But it may be because you had the crontab wrong. or because you weren't authenticated to the toolbox. In order to use the toolbox, it has to authenticate you with credentials that have rights to the volumes for which you are working with. Much like how you have to login to your server from your workstation before you can access files.

Marvin Huffaker MCNE, CNE
Marvin Huffaker Consulting
 
Thanks, again for all your help!

It's the toolbox authentication I'm having a problem with. The authentication screen was scrolling across the server and then it finally abended because I could not add anything.

I'll try this..
 
Ok, you should try messing around with Toolbox for a while. Figure out the authentication, how to purge, do a DIR, etc. Once you get that figured out, put it in the crontab to automate it. Then you should be set. I have a file I used once with a cronjob that automated several things including the authentication. If I can find it, i'll post it. might be a couple days though.



Marvin Huffaker MCNE, CNE
Marvin Huffaker Consulting
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top