6.883 bytes

Service Hints & Tips

Document ID: MCGN-3G5PKG

Aptiva - How do I backup OS/2?

Applicable to: World-Wide

There are several ways to backup OS/2 and your files. The BACKUP and RESTORE commands are part of OS/2 and are used to copy one or more files from one disk to another. They can provide an adequate safeguard of your files if you choose not to purchase other backup software.

The BACKUP and RESTORE commands lack the GUI (Graphical User Interface) that makes OS/2 so user friendly. You must use these commands at a command prompt, but with good reason. There are files, SYS.INI and OS2SYS.INI for example, that cannot be copied if the workplace shell is active. A GUI program would require the workplace shell in order to run. This limits the ease and ability of running a full backup.

However, you may boot your OS/2 system from diskettes and run the BACKUP command at a command prompt to backup almost all files. Please note that OS/2's BACKUP.COM will not backup system files (COMMAND.COM and CMD.EXE), hidden system files, open DLL (Dynamic Link Library) files and files marked with the Read/Write Only attribute.

The following shows the proper syntax for the BACKUP and RESTORE commands.

RESTORE SOURCEDRIVE: TARGETDRIVE:\PATH\FILENAME


The BACKUP command works much like the DOS BACKUP command. An example of the proper syntax to backup all files from the C drive to the A drive is shown below.

A:\> BACKUP C:\*.* A: /S

Notice that the command is used at the A prompt after booting off of the OS/2 installation diskettes. The /S switch is used to include all files in subdirectories. Refer to the table below for all applicable switches.

To RESTORE all files from backup diskettes back to the hard drive use the RESTORE command. For example,

A:\> RESTORE A: C:\*.* /S

The COMMAND REFERENCE does not mention all of the possible variations available with the BACKUP and RESTORE commands. For example, BACKUP.COM and RESTORE.COM accept wildcards (*), specific files, and subdirectories. OS/2 will also allow you to perform backups based on date and time. Here is the proper syntax for backing up all files with the extension TXT in the WINOS2 subdirectory on the hard drive to a floppy diskette.

C:\> BACKUP C:\OS2\MDOS\WINOS2\*.TXT A:

To perform a similar backup, but limit the files to those created after a certain date or time, you must add a switch. Here is an example of copying all files with the extension TXT that were created after 12-31-95 in the WINOS2 subdirectory on the hard drive to a floppy diskette.

C:\> BACKUP C:\OS2\MDOS\WINOS2\*.TXT A: /D:12-31-95

Refer to the tables below for other switches that may be used with the BACKUP and RESTORE commands respectively.


BACKUP COMMANDS


/L:FILENAME Creates a file called BACKUP.LOG by default. This file contains information about when, where, and what you backed up.

/D:MM-DD-YY Limits the backup to those files created after the date specified.

/T:HH:MM:SS Limits the backup to those files created after the time specified.

/M Backs up only those files that have been changed since your last backup.

/A Adds new backup files to the files you already have on your disk without overwriting the files you have backed up previously.

/F:XXX Formats the target disk before backing up to it. XXX sets the number of kilobytes on the target disk; i.e., 360, 720, 1200, 1440 or 2880.

/S Backs up the subdirectories beneath your current directory.



RESTORE COMMANDS


/P Asks for permission to restore read-only files or files that have changed since the last backup.

/M Restores only the files on the target disk that have changed since the last backup.

/B:MM-DD-YY Restores only the files on the target disk that have changed on or before the specified date.

/A:MM-DD-YY Restores only the files on the target disk that have changed on or after the specified date.

/E:HH:MM:SS Restores only the files on the target disk that have changed before the specified time.

/L:HH:MM:SS Restores only the files on the target disk that changed at or later than the specified time.

/S Restores the subdirectories from the backup disk.

/N Restores only the files to the target disk that do not already exist there.

/F Halts the restore process if the target disk does not support extended attributes which are present on the backup disk.

/D Lists the files on the backup disk that exist on the target disk also.

Search Keywords

Hint Category

OS/2, Utility Software, Hard Drives

Date Created

14-04-97

Last Updated

23-03-99

Revision Date

23-03-2000

Brand

IBM Aptiva

Product Family

Aptiva, PS/1

Machine Type

2121, 2155, 2144, 2168

Model

A94; G76; P76; S76; W76; 2R5; 2R7; 2R8; M30; M35; M50; 2R6; 4R7; 4R8; M40; M54; M58; P30; 2R0; M60; M70; 3R0; 3R8; 932; LS2; LSB; LP2; LPB; KP2; KPB; LL1; L10; K10; LL3; L30; K30; LL5; L50; K50; L33; K33; L35; K35; U33; U35; XP1; YP1; 27J; 28J; 63J; 64J; 65J; 70J; 71J; W30

TypeModel

Retain Tip (if applicable)

Reverse Doclinks
and Admin Purposes