9.620 bytes

Service Hints & Tips

Document ID: DSET-3FG896

PS/1-Aptiva - Can I backup specific directories and files on my fixed disk?

Applicable to: United States

Many PS/1 owners have asked if it is possible to make a backup of a particular directory or program on their fixed drives. Often, this is desired in addition to a complete DOS BACKUP by people who have numerous backup diskettes because of the size of their fixed drive.

It is easy to backup only one program or directory on a computer. To do this, use the DOS BACKUP command from the DOS command prompt. The syntax of BACKUP (with an explanation of the command) follows:

BACKUP SOURCE_DR:\PATH\FILENAME TARGET_DR:\ /PARAMETERS

Where-
- SOURCE_DR is the drive letter of the drive containing the files you want to backup. This will usually be drive C.

- PATH is the directory name that the files are in. For example, Works files are in the C:\WORKS directory and C:\WORKS\PROGRAM subdirectory. So, WORKS and PROGRAM are paths to the Works files.

- FILENAME is the name of the file(s) you want to backup. Although you would not type in more than one filename here, you can use globals (also known as wildcards or masks) to specify more than one file. If you want to backup all files in the directory, you would use the wildcard characters *.*. This indicates all files in the directory. When it is used, all files will be backed up. Other characters can be used with the global *.*. For example, if you want to backup all your Works word processing files that end with .WPS, you could use *.WPS as the filename. If you wanted to backup all files that started with the letter L, you would use L*.* as the filename.

- TARGET_DR is the drive location you want the files to go to. In most cases this will be a diskette in drive A or B, so the TARGET_DR would be A or B.

- PARAMETERS are options you can specify for the BACKUP command. For example, the /S parameter will tell BACKUP to not only backup the specified directory (given in the PATH) but also all files in subdirectories of the specified directory. This is very helpful in backing up a complete program that has files in different subdirectories of one primary directory. If you were to specify the target drive, path, and filename as C:\WORKS\*.* and then use the /S parameter, you would get a BACKUP of not only the files in the C:\WORKS directory but also in the C:\WORKS\PROGRAM directory because PROGRAM is a subdirectory of WORKS.

Other parameters include:

/M backs up only files that have changed since the last BACKUP.
/A adds files to be backed up to the files already present on the backup disk.
/F:[size] specifies the size of disk to be formatted for the BACKUP.
/D: mm-dd-yy backs up files that have been changed on or after the specified date.
/T: hh-mm-ss backs up files that have been changed at or after the specified time.
/L: [drive:path\logfile] creates a log file and entry to record the backup opertation. If no filename is specified, the name will be BACKUP.LOG. The file will be placed in the root directory of the SOURCE_DR. This file will contain the date and time of the backup and all the names of the files that were backed up by the BACKUP command.

Before backing up, note the directory name that includes the files you want to back up. If you want to backup DOS files, for example, make a note of the name of the directory these files reside in (DOS).



Remember, if you want to backup a complete program, many programs have subdirectories under the primary program directory. Therefore use the /S parameter. If you want a list of the files that were backed up, use the /L parameter.

As an example, let's assume you want to backup all of your Microsoft Windows program files. The primary directory for this program is C:\WINDOWS. So, this tells you what the SOURCE_DR and PATH need to be. Since you want to backup all files, you use the global *.*. You want the backup files to be put on a disk in drive A. So you know the TARGET_DR. Also, there are subdirectories below the WINDOWS directory. This means that you need to use the /S parameter. With these bits of information, you can string the command together:

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

Let's assume you want to backup all the Works program files (but not the letters that you had typed, which are Works data files) and have a file that lists all the files that were backed up (a log file). Type:

BACKUP C:\WORKS\PROGRAM\*.* A: /L

A file called BACKUP.LOG would be placed on the root directory of drive C. View it using the DOS File System. If you have to use the backup disks, use the RESTORE command. To issue this command you would type:

RESTORE SOURCE_DR:\ TARGET_DR:\PATH\FILENAME /PARAMETERS

For example, to restore the Windows files from the backup command issued above, you would type:

RESTORE A:\ C:\ /S

In the case of the RESTORE command for a complete program, DOS is smart enough to know where the backup files should go. Because of this, you don't have to give the PATH and FILENAME.

Search Keywords

Hint Category

DOS/Windows 3.x, Utility Software, Hard Drives

Date Created

24-03-97

Last Updated

23-03-99

Revision Date

23-03-2000

Brand

IBM Aptiva

Product Family

Aptiva, PS/1

Machine Type

2011, 2121, 2123, 2133, 2155, 2168, 2144

Model

C01; C34; M01; NEA; T35; U35; A62; A82; A94; B82; C42; C92; G42; M82; S92; 081; 087; 131; 137; K37; N31; N81; 11E; 13T; 14C; 16E; 17A; 18A; 18T; 19C; 21C; 23C; 28A; 46M; 51D; D50; G11; G13; G43; G46; G46; G49; G49; G50; G53; M40; M40; M46; M46; P11; P13; P43; P50; P53; R04; R05; R06; R09; R38; R42; R43; R44; R84; R86; R87; RO3; S11; S13; S43; S45; S45; S47; S47; S48; S48; S50; S53; W11; W13; W42; W42; W43; W45; W45; W50; W53; 20E; 22T; 24C; 24M; 28V; 39E; 41T; 43C; 45V; 48E; 50T; 52C; 55V; 72E; 74T; 76C; 78C; 79C; 81A; 82E; 84T; 86C; 87C; CC1; D53; G14; G44; G52; G54; G72; G76; G78; G82; NM1; P14; P44; P57; P71; P74; P76; P78; P84; R14; R15; R16; R17; R18; R51; R52; R57; R58; R62; R63; R67; R71; R89; R93; R96; R97; S14; S44; S50; S54; S70; S75; S76; S78; S80; W14; W44; W48; W54; W67; W76; W77; W78; Z33; 28V; 31E; 33T; 37C; 38C; 51E; 54T; 56C; 57C; 88V; BB1; G57; G87; OR1; OR3; OR4; OR5; P89; R28; R29; R31; R74; R78; R82; R98; S55; S85; SR1; US1; W52; W82; 1R2; 66P; 67P; 86P; OR8; 1R1; 1R3; 1R5; 22P; 24P; 25P; 27P; 29P; 63P; 67P; 82P; 83P; OR6; OR7; OR9; 1R0; 1R1; 26P; 62P; 2R0; P30; 2R3; S15

TypeModel

Retain Tip (if applicable)

Reverse Doclinks
and Admin Purposes