• Aucun résultat trouvé

The RESTORE Command

Dans le document User's THEOS/OASIS (Page 79-84)

THEOS Commands

Session 5: The RESTORE Command

This command is the mirror image of the ARCHIVE command.

The RESTORE command provides the ability to retrieve archived files. Files may be restored individually, in a group, by account, or using other options as described in figure 4.11. Like the ARCHIVE

command, RESTORE has no privilege value associated with it. In order to use RESTORE, you must be logged onto the SYSTEM account and be operating the computer in single-user mode.

The format of the RESTORE command is:

RESTORE FILENAME.FILETYPE DISK1 DISK2 (options

FILENAME.FILETYPE are the files to be restored (wildcards are allowed). DISK! is the disk the files are being restored from.

DISK2 is the disk which is to receive the restored files. DISK! and DISK2 must be specified and wildcards are not allowed.

Option Function

ACCOUNT Files owned by the currently logged account will be restored. This is the default option when FILENAME.-FILETYPE is specified.

ASK Allows the system manager to be prompted before the restore process begins. This is the default.

NEWACC xxx Only those files owned by account xxx are to be res-tored to the currently logged account.

NEWFILE Files are to be restored only when there are no exist-ing files of the same name in the ownexist-ing account.

This is a default.

NOASK Surpresses questions specified by ASK above.

NOQUERY System manager is not asked if it is OK to include files in the restore process. This is a default.

NOTYPE File descriptions being restored are not displayed on the screen during the restore.

NOVERIFY No verification of files is performed during the restore procedure.

OLDFILE Files will only be restored when a file already exists with the same name.

QUERY System manager is queried on a file-by-file basis dur-ing restore. A response of Y is required to restore a file. A response of N or <RETURN> advances to the next file query.

REPLACE Restored files are to replace any existing files of the same name.

TYPE File descriptions of each restored file are displayed on the screen during the restore operation. This is a default.

80 THEOS User's Handbook

VERIFY Verification of the restored files is performed. This is a default.

VOLUME All files without regard to the owning account are res-tored. This is a default when no FILENAME and FILETYPE is specified.

Figure 4.11. Restore options

Note: When restoring from a mUltiple volume set of disks, each archive volume is restored one at a time in sequence. You are prompted on the screen during this procedure as with the ARCHIVE command.

You cannot restore volume 0 I first and then skip to volume 04. Even when restoring individual files, all volumes are searched in sequence until they have been examined for the files to be restored.

Let's try some RESTORE examples. Assume we have previously archived some accounting data files to a floppy disk drive labelled G, which we now wish to restore. Since our floppy is only used for backup purposes, it is not always attached. Type:

>ATTACH G FLOPPY1 <RETURN>

Now type:

>RESTORE G S (NOQ <RETURN>

The system will respond and you will type:

Source on drive G(1) Destination on drive S(3)

Mount volumes now - V or <RETURN>

The system will respond:

Source disk is labeled "TEST Destination is labeled "D1

Archive is from disk "D1 " on 08/15/84 (or current date) at 14:14:49 (or current time)

Ok to start restore (YIN)? V <RETURN>

The system will display the following:

, Account:User10 (10)

File 1 not restored because file exists File 2 not restored because file exists File 3 not restored because file exists File 4 not restored because file exists File 5 not restored because file exists

File 20 not restored because file exists No files restored

Figure 4.12. Screen display of files being restored

, >RESTORE G S (NOQ REP Source on drive G(l )

Destination on drive S(3) Mount volumes now

-Source disk is labeled "TEST "

Destination is labeled "01 "

Ar chi ve i s fro m dis k " 01 " 0 n 08 I 1 5 /8 L, Ok to start restore (YIN)? Y

Account: USER10 (10)

File: PAUL.EXEC:S File: WALT.EXEC:S File: APOIAO.PM:S File: OASIS.MYRITE:S File: LEOGER.BAL$BARN:S File: SELECTX.COMMAND:S File: MWRITE.COMMANO:S File: OATAFILE.A:S File: DATAFILE.B:S File: OMOIM1.GL:S File: SPAO.COMMANO:S File: ORGANIZE.EXEC:S 12 files restored.

~> ~

Figure 4.13. Screen display of files being restored (NOQ REP options

82 THEOS User's Handbook

In the preceding example we wanted to restore all files on disk G to drive S, and we did not want to be QUERied on a file-by-file basis.

In this case we happened to be logged onto an account called USERIO.

Because the ACCOUNT option is a default, only files belonging to USERIO were restored. The reason being that those were the ONLY archived files on drive G.

As you can see from the screen display, no files were actually restored. The reason for this is that files of the same name already exist on the S drive. If one of those files became damaged or unusable for some reason, how could you restore that file from the backup without the "file already exists" message being displayed.

Try this:

>RESTORE G S (NOQ REP

This time, all files were successfully restored because we used the REPLACE option. This means that even though the files were already present, the REPLACE option tells THEOS to replace them anyway.

If we wanted to be asked ifit was Ok to replace each file, we could have typed:

>RESTORE G S (REP

Since QUERY is a default, we would have been asked on a file-by-file basis if it is Ok to restore the files.

MORE ON THE RESTORE COMMAND AND OPTIONS

RESTORE

Command/Options RESTORE G S (NOO NEWFILE

End Result

Files on drive G will be restored to drive S only when there are no files of the same name (NEWFILE) exist-ing on S. NOO tells THEOS not to ask on a file-by-file basis if it is Ok to restore.

RESTORE G S Files on drive G will be restored to drive S which (NOO NEWA USER1 belong to the account cailedUSER1 (NEWA option).

NOQ tells THEOS not to ask on a file-by-file if it is Ok to restore.

SUMMARY

To summarize, the RESTORE command is the mirror image complement of the ARCHIVE command. RESTORE and its options allow archived files to be retrieved on a global or selective basis. It is suggested that before a THEOS system is loaded with application software or data files, one spend time practicing the ARCHIVE/

RESTORE procedures.

If a tape drive is used for backup purposes instead of a floppy disk, TAPEI can be substituted for the floppy we have designated as drive G.

Dans le document User's THEOS/OASIS (Page 79-84)