FILE-SAVE
Saves a complete database to a backup tape.
Note
You can use the F-S command instead of FILE-SAVE, if you wish to carry out an overnight file-save.
Caution
You must always perform a VERIFY-SAVE as soon as possible after completing a save procedure. This verifies the integrity of the data saved to tape to ensure that it can be restored.
Command Class
Proc.
Syntax
FILE-SAVE
Restrictions
SYSMAN and SYSPROG only. If run from SYSPROG, accounts with update/retrieval lock codes are not saved.
On Windows, multi-reel tape operations are not supported. If the database cannot be fitted onto one reel, dbsave must be used.
Synonym (Q-Pointer) and remote (R-Pointer) accounts are not saved. Only accounts defined as D-Pointers are saved.
Multi-reel FILE-SAVEs cannot be restored on a Reality Release 7.x system.
Modifying the FILE-SAVE Proc
Caution
Do not change the standard FILE-SAVE or F-S Proc. Always copy standard Procs into your own Proc library file and make any changes to your copy.
If neither the FILE-SAVE nor F-S Procs suit your requirements for doing a FILE-SAVE, and you are experienced in writing Procs, you can copy the FILE-SAVE or F-S Proc from file SYSPROG-PL and customise it to meet your needs. F-S is a modified version of FILE-SAVE to enable an overnight save.
The FILE-SAVE Proc in its standard form lists the file STAT-FILE, one line per account. This is generated by making a call to LIST-$STAT-FILE*ACCOUNT-SUMMARY. This uses the N.ACCOUNT-SUMMARY macro that generates the one line per account output.
An alternative call to the LIST-$STAT-FILE* Proc, normally commented out in the FILE-SAVE Proc, can be made. This lists the file STAT-FILE with one line for each file on the database. You can create a Proc to generate this alternative listing by copying the standard FILE-SAVE Proc to your own Proc library and editing the copy.
The following example shows the statements in the FILE-SAVE Proc involved, although the line numbers may change depending on the release.
058 ONOW PRODUCING FILE-STATISTICS REPORT
059 * [SYSPROG-PL LIST-$STAT-FILE*]
060 * FOR A LISTING OF ALL THE FILES, BY ACCOUNT
061 *
062 [SYSPROG-PL LIST-$STAT-FILE*ACCOUNT-SUMMARY]
063 * IF YOU WANT TO SAVE PAPER BY GETTING ONE LINE PER ACCOUNT
064 *
To print a listing of all files on the database, remove the asterisk from line 59 and insert an asterisk in line 62.
Tape Contents
A FILE-SAVE tape comprises the following sections in the order given:
- Dummy bootstrap for Reality Release 7.x compatibility.
- Label.
- Dummy ABS for Reality Release 7.x compatibility.
- Files.
- T-DUMP of statistics file.
Comments
As well as being used for backup purposes, FILE-SAVE tapes can also be used to transfer data to another Reality or RealityX database.
The FILE-SAVE command can be issued when there are other users on the database. However, any updates users made after FILE-SAVE has written the files to tape are not backed up.
Many system administrators start the FILE-SAVE before they leave work in the evening and let it run at night while no one is working on the system. Then, if a problem arises that makes it necessary to restore all or some of the system's files, users know exactly what work has to be re-done.
If you have a heavily-used database to which users require 24 hours a day access, consult your local support representative to determine a suitable backup scheme. Transaction Logging which is an purchasable software facility on Reality may provide the level of resilience required.
FILE-SAVE gathers statistics on accounts and files on the disk and T-DUMPs them at the end of the FILE-SAVE tape. It also displays the number of GFEs encountered and prints a file statistics report. It is good practice to save the report along with the tape or set of tapes that FILE-SAVE produces. For more information on file statistics, refer to File Statistics Reports.
To save a database for restoring onto Reality Release 5.3 or 6.0, use OLD-ACCOUNT-SAVE or OLD-FILE-SAVE or the migration utilities, described in the User's Guide to the Reality Migration Utilities.
Procedure
- Ensure that the tape is loaded and on-line, that the tape is NOT write-protected, and you are logged to SYSMAN or SYSPROG.
-
Enter at the TCL prompt:
FILE-SAVE
-
The software now prompts for the required record block size:
Enter tape record block length, if other than 16000?
Enter the required record size. Press return to accept the default value (16000).
Note
The record size used with encrypted tape devices must be a multiple of 8.
-
The software then prompts for the tape units to be assigned:
Enter tape units desired, in sequence, separated by commas.
Enter the number(s) of the tape unit(s) to be assigned. Multiple tape units can be used in sequence. Refer to the topic Multiple Tape Units for details.
-
Next the required tape density is prompted for:
Enter tape density (if other than Default Density)
Possible values may be 800, 1600, 3200 and 6250 bpi, depending on your system. A density of 1600 or 3200 may be required for compatibility with other systems. A density of 6250 bpi reduces the number of tapes.
Pressing RETURN only results in the default density, as configured in the database config file.
This initiates an ASSIGN on the specified tape unit. A message similar to the following is displayed.
[1021] DEVICE(S) TAPE 1 NOW ASSIGNED,
RECORD SIZE = 16000 DENSITY = 1600 -
The software then prompts for any text that you wish to include in the tape label (the time, date, reel number, and tape record size are automatically included in the label). The prompt is:
Tape label if desired
Enter up to 44 or 42 characters of text, depending on the record size you have chosen. If the record size is greater than 31767 bytes (32Kbytes), you are limited to 42 characters.
-
FILE-SAVE now proceeds, as requested. If required, it prompts for additional reels to be mounted.
Failure to write data to tape may result in an error message:
Tape operation failed (after retries) Bad Tape - unable to continue. Type "Q" to Quit
Refer to the topic Error Messages for a description of the message.
On completing the FILE-SAVE the file statistics report is printed, the tape unit detached and the terminal is logged off automatically. The tape is rewound and unloaded.
- Re-load the tape, logon again to the database and re-attach the tape unit using ASSIGN or T-ATT.
-
Enter T-REW to rewind the tape to the BOT and then use the VERIFY-SAVE command to check the integrity of the FILE-SAVE tape.
- Finally detach the tape unit, using CLEAR-ASSIGN or T-DET, to enable other database users to attach the tape unit.
Example
The following shows a typical FILE-SAVE procedure.
:FILE-SAVE 20:33:09 07 SEP 1999 NOTE FILESAVE TAPES CANNOT BE RESTORED ON A RELEASE PRIOR TO 7.0 Tape record block length (if other than 16000) ? Enter tape units desired, in sequence, separated by commas ?1 Tape density (if other than Device Default) ? Tape label if desired PRODUCTION SYS 20:34:02 07 SEP 1999 SYSTEM . . . [99] 1564 TAPE RECORDS WRITTEN . . . END FILE SAVE . . . 20:53:57 07 SEP 1999 T-DUMP STAT-FILE NOW PRODUCING FILE-STATISTICS REPORT FILE-SAVE COMPLETE . . . *************************************************** *** CONNECT TIME AT 22:53:55 = 80 MINUTES *** *** CPU MS. = 306828 DISC I/O = 6726 *** *** NUMBER OF ACTIVATIONS = 203389 *** *************************************************** *** LOGGED OFF AT 22:53:55 ON 07 SEP 1999 *** Disconnected