Share on Facebook Share on Twitter Email
Answers.com

DOS Backup/Restore

 
Computer Desktop Encyclopedia: DOS Backup/Restore

(For DOS 6 users, see DOS MSbackup.) Backup and Restore are external commands that let you back up your hard disk onto as many floppies as required. Backup and Restore are not widely used, because you cannot Restore files onto a different PC that you backed up from a previous DOS version. Most people use the DOS Copy and Xcopy commands or use third-party backup programs for making backups. Backup and Restore were eliminated in Windows 95.

USING THE BACKUP AND RESTORE COMMANDS

To back up all the files in directory WORK on drive C onto floppies in drive A, type:

          backup c:\work a:

BACK UP AND FORMAT

If you don't have a lot of formatted floppies, you can format them at the same time you're backing up. In DOS 3.3 and lower, add /f:

          backup c:\work a: /f

As of DOS 4.01, Backup automatically runs the Format program if it finds an unformatted disk.

BACK UP ONLY UPDATED FILES

To back up only those files that have been changed since the last update, add /m (see Archive Attribute in DOS Attrib):

          backup c:\work a: /m

BACK UP SUBDIRECTORY FILES TOO

To back up the files in WORK as well as all files in subdirectories attached to WORK, add /s:

          backup c:\work a: /s

ADDING FILES

When running Backup, existing files on the floppies are erased. To add to the disks (keep existing files), use /a:

          backup c:\work a: /a

You can mix any of the switches (/s, /m, /f, etc.); such as:

          backup c:\work a: /m /s

CREATE A BACKUP LOG

Starting with DOS 3.3, the /l switch lets you create a file containing the names of each file backed up along with its backup disk number. If you don't name the file, BACKUP.LOG will be created in the root directory of the current drive. If the log file exists, file names will be added to the list. The following example creates MYLOG in MYDIR on drive E:

   backup c:\work a: /m /s /l:e:\mydir\mylog

RESTORING FILES

To restore files, you must explicitly state which files. To restore all files back into the C:\WORK directory from the A drive, type:

         restore a: c:\work\*.*

To restore only EXE files, type:

         restore a: c:\work\*.exe

To restore all files, including the subdirectory files, add the /s:

         restore a: c:\work\*.* /s

Download Computer Desktop Encyclopedia to your iPhone/iTouch

Search unanswered questions...
Enter a question here...
Search: All sources Community Q&A Reference topics
 
 

 

Copyrights:

Computer Desktop Encyclopedia. THIS COPYRIGHTED DEFINITION IS FOR PERSONAL USE ONLY.
All other reproduction is strictly prohibited without permission from the publisher.
© 1981-2009 Computer Language Company Inc.  All rights reserved.  Read more