![]() |
DOS Backup Commands |
The information in this document applies to:
WordPerfect® 5.1 for DOS
Problem
Solutions: DOS BACKUP COMMAND The BACKUP command "backs up" one or more files from your hard disk system onto diskettes for safekeeping. You could copy your files onto diskettes using the COPY command, but once a diskette is full, the COPY command stops working. The BACKUP command allows you to keep going; it keeps prompting you to insert fresh diskettes, until the backup is complete. Thus, an entire hard disk may be backed up onto diskettes with a single BACKUP command. Moving the same number of files using the COPY command would require at least one COPY command per diskette, and probably many more. Be sure to label the diskettes as you use them, and number them in sequence; they should be used in the same order with RESTORE. The basic format for the BACKUP command is: BACKUP C: [path] [filename] A: Your diskettes must be formatted. The c:filename specifies the file or files you want to back up. When omitted, this drive designator defaults to C:, regardless of the current drive. The a: specifies the diskette drive to receive the files. Wild cards may be used, and if you omit the file name entirely, the whole directory is backed up. The command BACKUP C: *.EXE A:, copies all files with an extension of .EXE in the current directory on the C: drive, onto diskettes n the A: drive. Once you have entered the BACKUP command, you will be prompted to insert a diskette to be used for the backup files. Unless you specify /A, BACKUP will delete all files currently on the diskette before it begins. After BACKUP has filled one diskette, it will prompt you to insert another, until all the files specified have been backed up. These backed up files have a format different from a standard file. Backed up files on diskette cannot be used in normal operations. BACKUP displays the name of each file it processes, so you can tell what files have been backed up. Once the backup is complete, you should number the diskettes and store them in a safe place. They are your protection against the loss of a great deal of work. This protection is the primary function of BACKUP. Since ASSIGN, SUBST, and JOIN change DOS's interpretation of drive designators, BACKUP may not work correctly if any of these commands are in effect. You should use the BACKUP command only after removing all ASSIGNs, SUBSTs, and JOINs. The following batch file can be used as a quick solution for customers wanting to know how to back-up their files. At DOS have them change to a "C:\>" prompt and then type the following: COPY CON BACKITUP.BAT echo off cd BACKUP C:\ A: /S ^Z If they are using WordPerfect they can eliminate the line "COPY CON BACKITUP.BAT." Instead of creating the file at DOS they can create the file in WP and then save it into a DOS text format under the name C:\BACKITUP.BAT (Text In/Out, (Ctrl-F5, 1,1). BACKUP Options /S Backs up all files in all subdirectories of the current directory. /M Backs up all files that have been modified since the last backup. /A Allows backup files to be added to an existing backup diskette. /D Backs up those files changed or created since a certain date. The user can also add the /M or /D switches and the command line variable %1 to the end of the BACKUP statement. Copy con BACKITUP.BAT echo off cd BACKUP C: A: /S /M - or - BACKUP C: A: /S /D%1 Since the /M switch backs up files from a certain date, the user can insert this switch when doing a regular full backup at periodic intervals. DOS automatically sets to "on" the archive attribute each time the user saves or modifies a file. It determines if a file is to be copied. If set to On, the file will be copied and the "/m" will turn to "off" the archive set switch, otherwise the file will not be included in the back-up. Adding the /D will allow them to specify a date when they are invoke the batch file. The :%1 searches the command at the C:\> prompt for the date entered by the customer. It will then replace the %1 in the XCOPY statement line with the specified date and copy only those files modified or created on that date or later. BACKUP Shortcuts Once you've backed up all of a disk, you really don't need to back it up for a while, just periodically backing up any files that you've added or changed should be enough. Using the /M /A or /D, DOS keeps a record of which files have been changed and have not been backed up, and BACKUP is smart enough to recognize them if you ask it to. This is done with the /M switch, which tells BACKUP to only copy the files you've changed since the last backup. It is a good idea to periodically make a complete copy of your hard disk, however often you think is adequate. Once a month is a good idea. Between these major backups it is a smart idea to make incremental backups, copying only the files that have been changed in the meantime. You should do this much more often, possibly Once a week. BACKUP C:\ A: /S BACKUP C:\ A: /M /S Restore Files: RESTORE The RESTORE command restores backed up files to the hard disk. The file's original format is regained after the RESTORE function is employed. RESTORE can only be used with files created by BACKUP. The basic format of the RESTORE command is: RESTORE A: C: The first parameter in the RESTORE command is the backup diskette drive. The second parameter is the hard disk drive to which you wish to restore. Wild cards are accepted. If you do not specify a file name, then all files backed up from the specified directory will be restored. If you want to restore all files with an extension of .DAT from backup diskettes in the A: drive to the root directory on C: drive, you would enter: RESTORE A: C: *.DAT RESTORE will prompt you to insert the first backup diskette. If the file you have selected to restore is on the diskette, it will be restored. Otherwise, RESTORE will ask for the next diskette in the original BACKUP sequence, until the entire backup set has been searched for the specified file. With your files correctly backed up, your backup set will always protect you against a really catastrophic loss of data. For further information on this DOS command refer to Chapter 6 of the MS-DOS 5.0 Manual (Managing Disks) and Chapter 14 (Commands) which contain proper syntax and valid switches for the RESTORE command. Also, typing HELP RESTORE at the DOS command line and pressing Enter will list syntax and switch information about this command. |
Answer:
Details:
Product specifications, packaging, technical support and information (*Specifications*) refer to theUnited States retail English version only. Specifications for other versions may vary. All Specifications, claims, features, representations, and/or comparisons provided are correct to the best of our knowledge of the date of publication, but are subject to change without notice.OUR MAXIMUM AGGREGATE LIABILITY TO YOU AND THAT OF OUR DEALERS AND SUPPLIERS IS LIMITED. IT SHALL NOTEXCEED THE AMOUNT YOU PAID TO ACCESS THE INFORMATION. SEE LEGAL DISCLAIMER. |