Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ restore(CMD) — OpenDesktop 3.0.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought


 restore(CMD)                    19 June 1992                    restore(CMD)


 Name

    restore - restore files that were backed up by using the backup command

 Syntax


    restore drive1: drive2:[path[filename]] [/s] [/p] [/b:date]
    [/a:date] [/e:time] [/l:time] [/m] [/n] [/d]


 Description

    You can restore files from similar or dissimilar disk types.

 Parameters


    drive1:   Specifies the drive on which the backed-up files are stored.

    drive2:   Specifies the drive to which the backed-up files will be
              restored.

    path      Specifies the directory to which the backed-up files will be
              restored.  You must specify the same directory from which the
              files were backed up.

    filename  Specifies the names of the backed-up files you want to restore.


 Switches


    /s        restores all subdirectories.

    /p        Prompts you for permission to restore files that are read-only
              (that have the read-only attribute set) or that have changed
              since the last backup (that have the archive attribute set).

    /b:date   Restores only those files last modified on or before the speci-
              fied date.  The format of date varies according to the country
              setting in your CONFIG.SYS file.  For information about speci-
              fying date, see the date(CMD) command.

    /a:date   Restores only those files last modified on or after the speci-
              fied date.  The format of date varies according to the country
              setting in your CONFIG.SYS file.  For information about speci-
              fying date, see the date(CMD) command.

    /e:time   Restores only those files last modified at or earlier than the
              specified time.  The format of time varies according to the
              country setting in your CONFIG.SYS file.  For information about
              specifying time, see the time(CMD) command.

    /l:time   Restores only those files last modified at or later than the
              specified time.  The format of time varies according to the
              country setting in your CONFIG.SYS file.  For information about
              specifying time, see the time(CMD) command.

    /m        Restores only those files modified since the last backup.

    /n        Restores only those files that no longer exist on the destina-
              tion disk.

    /d        Displays a list of the files on the backup disk that match the
              names specified in filename without restoring any files. Even
              though no files are being restored, you must specify drive2
              when you use /d.


 Notes


    Checking restored files

    Once a file has been restored, you can use the dir or type command to
    make sure the file was restored properly.

    Limitations on restore

    You cannot use the restore command to restore system files (IO.SYS and
    MSDOS.SYS).  restore does not work with drives that have been redirected
    with the assign, join, or subst command.

    Compatibility with previous versions of backup

    The MS-DOS version 5.0 restore command can restore files that were backed
    up by using any previous version of the MS-DOS backup command.

    restore exit codes

    The following list shows each exit code and a brief description of its
    meaning:

         0    restore successfully restored the file or files.

         1    restore could not find the files to restore.

         3    The user pressed CtrlC to stop the restoring operation.

         4    restore stopped because of an error.

    You can use the errorlevel parameter on the if command line in a batch
    program to process exit codes returned by restore. For an example of a
    batch program that processes exit codes, see the backup(CMD) command.

    Listing the names of backed-up files

    Use the /d switch to see a list of the backed up files.  If you specify
    filename with the /d switch, restore displays a list of the backed up
    files that match the name you specify.  If you use the /d switch, restore
    does not restore any files.

 Examples

    To restore the file INVEST.MNT from the backup disk in drive A to the IRS
    directory on drive C, type the following command:

       restore a: c:\irs\invest.mnt


    MS-DOS prompts you to insert the backup disk into drive A.  Once the
    backup disk is in drive A, press Enter to continue.

    Suppose you backed up all of the files in the directory \USER\ADAMS on
    drive C.  To restore these files, insert the backup disk in drive A and
    type the following command:

       restore a: c:\user\adams\*.*


    It is important that you specify *.* for filename.  Otherwise, the
    restore command attempts to restore a file named ADAMS in the USER direc-
    tory.

    To restore a complete hard disk from a backup disk (or disks) in drive A,
    type the following command:

       restore a: c:\*.* /s


    The /s switch and the wildcards (*.*) specify that restore is to restore
    all backed-up files to their original directories and subdirectories on
    drive C.

 Related command

    For information about backing up files, see the backup(CMD) command.


Typewritten Software • bear@typewritten.org • Edmonds, WA 98026