Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-06 - 43,50407/dskcpy.doc
There are no other files named dskcpy.doc in the archive.
;DOCUMENTATION REFLECTS DSKCPY V2A(53)-1
;
1.  PURPOSE
    =======
	TO MAKE A LOGICAL COPY FROM ONE ('SOURCE') DISK FILE-STRUCTURE
	TO ANOTHER ('OBJECT' FS). THIS ENABLES FILES TO BE SAVED AND
	RESTORED, PROMOTING FILE INTEGRITY & REDUCING FRAGMENTATION.
	THE PROGRAM SHOULD BE RUN EVERY NIGHT FOR PUBLIC FS, AND AS
	REQUIRED FOR OTHERS.

2.  DESCRIPTION
    ===========
	BOTH FS MUST BE MOUNTED & ON LINE & WRITE-ENABLED. THE FS NAMES
	ARE INPUT AS FOLLOWS :-
		.R DSKCPY
		-
	2.1	FROM WHICH FILE-STRUCTURE ?  sourcefs
		---------------------------
		TO WHICH FILE-STRUCTURE ?  objectfs
		-------------------------
	2.2	MODE: mode/switches
		-----

		WHERE 'mode' IS 'COPY', 'PURGE', 'HELP' OR 'EXIT' S.T.
		COPY  = PERFORM LOGICAL COPY
		PURGE = AS FOR COPY, BUT DELETE FILES FROM THE SOURCE FS
			THAT HAVE NOT BEEN ACCESSED FOR SOME TIME (DONE
			AFTER COPIED TO THE OBJECT FS).
		HELP  =	PRINT HELP MESSAGE
		EXIT  = EXIT

	2.3	SWITCHES MAY BE APPPENDED TO 'COPY' OR 'PURGE'  GIVING
			MODE: COPY/SWITCH1/SWITCH2/.../SWITCHn
		OR	MODE: PURGE/SWITCH1/SWITCH2/.../SWITCHn
		WHERE SWITCH i  IS ONE OF THE FOLLOWING :-
		ACCESS:n	COPY FILES ACCESSED SINCE n DAYS AGO
				(DEFAULT IS # DAYS SINCE LAST RUN FOR
				SAME OBJECT FS ID, ELSE 9999)
		CREATE:n	COPY FILES CREATED SINCE n DAYS AGO
				(DEFAULT AS FOR /ACCESS)
		DELETE:m	DELETE FILES NOT ACCESSED FOR m DAYS
				VALID FOR PURGE ONLY.(DEFAULT = 30 DAYS)
		INCREMENTAL	FORCE ACCESS AND CREATE DEFAULTS TO LAST
				RUN (FROM sourcefs:DSKCPY.LOG[1,4])
		MSGLEVEL:n	0=NO FILE INFO
				1=PRINT COPIED FILENAMES
				2=PRINT DELETED FILENAMES
				4=PRINT DIRECTORY NAMES COPIED
				8=PRINT DIRECTORY NAMES PURGED
				(DEFAULT IS 2)
		NOACCESS	FILE SELECTION BY ACCESS DISABLED
		NOCREATE	FILE SELECTION BY CREATION DISABLED
		NODELETE	NO FILE DELETION (i.e. COPY MODE)
		NOQUE		DON'T COPY *.*[3,3]   (DEFAULT)
		NOSORT:DIRECT	DON'T SORT UFDs IN ASC. ORDER
		NOSORT:FILES	DON'T SORT FILES IN ASC. ORDER
		NOSYS		DON'T COPY *.*[1,4]
		PATH:F.EXT[PPN]	ONLY COPY FILES F.EXT IN DIRECTORY PPN.
				WILDCARD * AND ? MAY BE USED.
				WHEN PATH IS USED, CONTROL RETURNS
				TO MODE: LEVEL WHEN COPY COMPLETES.
		QUE		COPY *.*[3,3]
		SORT:DIRECTORY	SORT THE MFD SO UFDs APPEAR IN
				ASCENDING ORDER.	(DEFAULT)
		SORT:FILES	SORT THE UFDs SO FILES APPEAR IN
				ASCENDING ORDER.	(DEFAULT)
		SORT		SORT BOTH DIRECTORY AND FILES.
		SYS		COPY *.*[1,4]   (DEFAULT)
3.  PROCEDURES
    ==========
	EXAMPLES ARE GIVEN FOR STANDARD CASES. PROGRAM TYPEOUT IS UNDER-
	LINED :-

	3.1  COPY
		.R DSKCPY
		-
		FROM WHICH FILE-STRUCTURE ? DSKE
		----------------------------
		TO WHICH FILE-STRUCTURE ? DSKV
		--------------------------
		MODE: COPY/INCR
		------
		FS HAS NOW BEEN COPIED
		----------------------
		EXIT
		----

	3.2   PURGE
		.R DSKCPY
		-
		FROM WHICH FILE-STRUCTURE ? DSKG
		----------------------------
		TO WHICH FILE-STRUCTURE ? DSKX
		--------------------------
		MODE: PURGE/INCR
		------
		FS HAS NOW BEEN PURGED
		----------------------
		EXIT
		----

	3.3  INDIVIDUAL PPN
		.R DSKCPY
		-
		FROM WHICH FILE-STRUCTURE ? DSKE
		----------------------------
		TO WHICH FILE-STRUCTURE ? DSKV
		--------------------------
		MODE: COPY/PATH:[1,2]
		------
		MODE: PURGE/PATH:*.QU?[3,3]
		------
		MODE: EX
		------
		EXIT
		----

	3.4  RECREATING FS FROM ARCHIVE FS
		.R DSKCPY
		-
		FROM WHICH FILE-STRUCTURE ? DSKZ
		----------------------------
		TO WHICH FILE-STRUCTURE ? DSKJ
		--------------------------
		% DIFFERENT SOURCE FS NAME !!!
		------------------------------
		% DIFFERENT OBJECT FS ID !!!!
		-----------------------------
		MODE: COPY/PATH:[?,?]
		------
		MODE: COPY/PATH:[20?,20?]
		------
		MODE: COPY/PATH:[10?,*]
		------
		MODE: COPY/A:30/NOCREATE
		------
		FS HAS NOW BEEN COPIED
		----------------------
		EXIT
		----

	3.5  RECREATING FS TO FREE LOST CLUSTERS & REDUCE FRAGMENTATION.
		(TO BE RUN DEDICATED)
		;MOUNT THE OLD (FRAGMENTED) DSKJ AS JOLD
		;MOUNT THE NEW (REFRESHED) DSKJ AS DSKJ
		.R DSKCPY
		-
		FROM WHICH FILE-STRUCTURE ? JOLD
		----------------------------
		TO WHICH FILE-STRUCTURE ? DSKJ
		--------------------------
		% DIFFERENT OBJECT FS ID !!!!
		-----------------------------
		MODE: COPY
		------
		FS HAS NOW BEEN COPIED
		----------------------
		EXIT
		----
		.;DISMOUNT JOLD
4.  ERRORS AND MESSAGES
    ===================
	4.1	(SEMI) FATAL ERRORS ARE OUTPUT TO THE TTY. THESE ARE :-

		? SOURCE FILE-STRUCTURE MUST BE ON-LINE & WRITE-ENABLED
		? CAN'T OPEN SOURCE FS
		% FS NAME ON HOME BLOCK IS DIFFERENT
		% FIRST HOME BLOCK FAULTY
		? ERROR WITH SOURCE FS HOME BLOCK
		? OBJECT FILE-STRUCTURE MUST BE ON-LINE & WRITE-ENABLED
		? CAN'T OPEN OBJECT FS
		? ERROR WITH OBJECT FS HOME BLOCK
		% DIFFERENT SOURCE FS NAME !!!
		% DIFFERENT OBJECT FS ID !!!!
		? CAN'T OPEN OR ENTER TTY FOR ERRORS
		? ERROR LOOKUP ON SOURCE FS MFD
		? ERROR READING MFD RIB ON SOURCE FS

	4.2	NON FATAL ERROR MESSAGES ARE OUTPUT TO TTY:DSKCPY.ERR .
		THE OPERATOR CAN ROUTE THESE MESSAGES BY ASSIGNING 
		DSK:,LPT: ETC. TO TTY .  THESE ARE :-

		LOOKUP ERROR (CODE n) WITH fn.ext 
		ERROR READING RIB(STATUS = n) FOR fn.ext 
		ENTER ERROR (CODE n) WITH fn.ext
		ERROR READING(STATUS = n) fn.ext 
		CHECKSUM ERROR WITH fn.ext 
		ERROR WRITING(STATUS = n) fn.ext
		RENAME ERROR (CODE n) WITH fn.ext 
		COPIED fn.ext
		DELETED fn.ext 
		ERROR IN CLOSING(STATUS = n) fn.ext 
			COPIED fn.ext	(DIRECTORIES ONLY)
			PURGED fn.ext	(DIRECTORIES ONLY)
		OBJECT FS FILLED AT fn.ext 
		FS HAS NOW BEEN COPIED 
		FS HAS NOW BEEN PURGED 

	4.3	A LOG-FILE, sourcefs:DSKCPY.LOG[1,4], IS KEPT.
		THIS RECORDS DATE,TIME,DISK ID'S AND # FREE BLOCKS
		BEFORE AND AFTER RUN ON BOTH THE FS. (THIS FILE IS
		DUPLICATED ON objectfs:DSKCPY.LOG[1,4])
			THE SOURCE FS NAME AND OBJECT FS ID ARE CHECKED
		AGAINST THIS FILE TO PREVENT MISUSE. THE DATE OF THE
		LAST RUN IS EXTRACTED AND USED AS INCREMENTAL DEFAULTS
		IN /ACCESS & /CREATE.  THE FORMAT IS :-

			 SOURCE FS	   ^         OBJECT FS
  DATE   TIME F  FSNM   FSID  BEFORE  AFTER  FSNM   FSID  BEFORE  AFTER

07-01-75 1951 C DSKE   M005L    7937   7916 DSKV    C520   78785  47963
08-01-75 1843 C DSKE   M005L    7518   7521 DSKV    C520   47963  47861
09-01-75 1915 C DSKE   M005L   10001  10317 DSKV    C520   47861  45797
10-01-75 2000 C DSKE   M005L   11196  11017 DSKV    C520   45797  41696
5.  REMARKS
    =======
	5.1	THE PROGRAM RUNS UNDER NORMAL TIMESHARING.
	5.2	THE PROGRAM IS 'PURE', i.e. REENTRANT & SHARABLE.
	5.3	CORE REQUIREMENTS ARE 1K(PLUS DYNAMIC DATA SPACE)+2K.
	5.4	FOR SAFETY AGAINST SUBSEQUENT SYSTEM MALFUNCTION, THE
		ARCHIVE("OBJECT") FS SHOULD BE DISMOUNTED IMMEDIATELY
		AFTER PROGRAM COMPLETION.