• Aucun résultat trouvé

Backing up and restoring critical files

Dans le document "Extension of the Macintosh to UNIX® " (Page 110-117)

This section presents the simplest ways for you to create backup copies of your critical files and of your whole system.

D Important You should always have backup copies of your own files. A system administrator should do a periodic backup of all the files on your system. 6

If you need to back up your entire disk, follow the instructions in "Using the cpio Utility to Back Up Your Entire Hard Disk."

Inserting floppy disks

When you insert floppy disks, the system can respond in a variety of ways, depending on how the floppy disk was initialized and upon whether you are currently working in the Finder or in CommandS hell.

If you want to back up a folder or a file by dragging an icon to the floppy disk's icon, you need to be in the Finder and to insert a floppy disk that is initialized for the Macintosh file system. For further information on this method of backing up files, see "Dragging to Copy a File to a Floppy Disk," later in this chapter.

If you want to use standard A/UX backup utilities, such as tar or cpio, you need to be in CommandShell and to use a destination disk that has been formatted. For further information on using cpio, see "Using the cpio Utility to Back Up Files," later in this chapter.

For more information on the Finder, see "Identifying What you See on the Screen" and "Using the Finder," earlier in this chapter.

For more information on CommandShell, see Chapter 5, "Using CommandShell."

For information on making backup copies, see AlUX Local System Administration.

If you are in the Finder

If the floppy disk has been initialized for the Macintosh file system, its icon, shown in Figure 2-31, appears near the right edge of the screen.

• Figure 2-32 A Macintosh floppy disk icon

text backup

If the floppy disk has not been initialized for the Macintosh file system, you see a series of dialog boxes warning you that this is the case. These dialog boxes guide you through the initialization process.

1. In the first dialog box (illustrated in Figure 2-33), click Two-Sided.

2. When the second dialog box appears, click Erase.

You may click Cancel if the disk contains data that you don't want to erase.

Chapter 2 Getting Around in A/UX 2-47

• Figure 2-33 Disk-initialization dialog boxes

This is not a Macintosh disk::

Do you want to initialize it?

n

Eject

J

[one-Sided] [Two-Sided]

1.\, This process will erase all

~ information on this disk:.

Cancel

n

Erase

J

If you are in CommandS hell

If the floppy disk has been initialized for A/UX data (for example, a UNIX file system, tar, or

cpio) nothing happens; no icon appears and no dialog box appears. Therefore, you cannot use the Finder or the menus in the menu bar with this disk. You can work with it only by using A/UX command-line commands. You may use it for backing up files with A/UX backup utilities, such as tar or cpio.

If the floppy disk has never been initialized, or if it is initialized for a Macintosh file system, a dialog box (shown in Figure 2-34) asks you to specify whether you want to use it for the Macintosh file system or for an A/UX file system. A third choice is to eject the disk (and therefore to qmcel the procedure).

• Figure 2-34 Initializing for a Macintosh or an A/UX data disk

This is a Macintosh disk.

What do you want to use it as?

(Macintosh)

R/UH Data» Eject

• If you click A/UX Data, after the initialization is complete, the disk behaves like the A/UX disk described above (that is, no icon appears, and so on).

• If you click the Macintosh button, the ensuing dialog boxes guide you through the initialization process for a Macintosh HFS file system disk. You must use the Macintosh disk with the Finder.

Dragging to copy a file to a floppy disk

A/UX 2.0 provides a very easy way to copy individual files and groups of files. Follow these steps:

1. Be sure that you are in the Finder.

2. Insert a floppy disk (initialized for the Macintosh fue system) into the disk drive.

You see an icon representing the disk.

3. Drag the icon of the fue or folder that you want to copy to the floppy disk icon.

A dialog box appears describing the progress of the copy operation.

You can shift-click to select multiple files or folders to back up.

Chapter 2 Getting Around in A/UX 2-49

Dragging to restore a ftle

A/UX 2.0 provides a very easy way to restore files or folders that were backed up by dragging their icons to a disk. Follow these steps:

1. Insert in the drive the floppy disk containing the ftle you want to restore.

You see an icon representing the disk.

2. Double-click the disk icon to display a window with the disk's contents.

3. Drag the icon of the ftle or folder that you want to copy to the folder where you want it to reside.

A dialog box appears describing progress of the copy operation.

You can shift-click to select multiple files or folders to restore.

Using the epio utility to back up ftles

A/UX provides several utilities to back up files. In this section you learn about the cpio (copy in and out) utility, which copies data in a stream of bits. This section describes one way to copy a file for backup purposes.

1. Choose CommandShell in the Apple menu.

A window appears with a command prompt. For further information on the CommandShell, see Chapter 5, "Using CommandShell."

2. Insert a floppy disk into the disk drive.

It should be initialized as an A/UX disk, not a Macintosh disk. (See "If You are in CommandShell," earlier in this chapter.) Since this is not a Macintosh disk, the desktop does not display an icon representing the disk.

3. Enter the command:

echo filename I cpio - 0 > /dev/rfloppyO

Substitute the name of the file you want to copy for the italicized word. Your computer may have a second floppy disk drive available. If you are using the alternate drive, substitute /dev/rfloppyl for /dev/rfloppyO.

• Note: You can also use Commando to enter this command. See Chapter 4, "Using Commando," for more information about Commando. The CommandS hell window must be active before you insert the floppy disk, whether you use Commando or the preceding steps.

For more information on the cpio utility, see cpio(1) in A!UX Command Reference.

Using the cpio utility to restore flIes

The cpio (copy in and out) utility copies data in a stream of bits. This section describes one way to restore a file from a cpio copy of the file.

1. Choose CommandShell in the Apple menu.

A window appears with a command prompt. For further information on CommandShell, see Chapter 5, "Using CommandShell."

2. Insert in the drive the floppy disk containing a ftle you want to restore.

Remember, you can restore a file in this way only if you used cpio to back it up.

Because the floppy disk does not contain a Macintosh file system, your desktop does not display a disk icon. However, when you specify the disk in the command line, the cpio utility will locate the disk and restore the file.

3. Enter the command:

cpio -i v filename < / dev / floppyO

Substitute the name of the file you want to copy for the italicized word. Your computer may have a second floppy disk drive available. If you are using the alternate drive, substitute /dev/rfloppyl for /dev/rfloppyO.

• Note: You can also use Commando to enter this command. See Chapter 4, "Using Commando," for more information about Commando. The CommandS hell window must be active before you insert the floppy disk, whether you use Commando or the preceding steps.

Chapter 2 Getting Around in A/UX 2-51

For more information on the cpio utility, see cpio(1) in A!UX Command Reference.

Using the cpio utility to back up your entire hard disk

You can use the cpio (copy in and out) utility to back up and restore your entire hard disk.

This section describes how to back up your disk onto another hard disk. Before beginning, be sure that your destination hard disk has been initialized as an A/UX file system with the HD SC setup utility and is properly cabled to your system.

1. Choose CommandS hell to bring the shell utility to the front layer.

A window appears with a command prompt. For further information on the CommandShell, see Chapter 5, "Using CommandShell."

2. Enter the command:

find / -print I epio - 0 > /dev/rdsk/c?dOs31

Substitute the SCSI ID number of the destination hard disk for the italicized question mark.

• Note: You can also use Commando to enter this command. See Chapter 4, "Using Commando," for more information about Commando.

For more information on the cpio utility, see cpio(1) in A!UX Command Reference.

Using the cpio utility to restore the entire hard disk

This section describes one way to restore an entire disk from an external hard disk. Use this method if you previously used the cp i 0 utility to back up the disk.

1. Choose CommandS hell to bring the shell utility to the front layer.

A window appears with a command prompt. For further information on the CommandShell, see Chapter 5, "Using CommandShell."

2. Enter the command:

epio -id < /dev/rdisk/c1dOs31

In place of the question mark, type the SCSI ID number of the hard disk containing the backup data.

• Note: You can also use Commando to enter this command. See Chapter 4, "Using Commando," for more information about Commando.

For more information on the cpio utility see cpio(1) in A/UX Command Reference.

Dans le document "Extension of the Macintosh to UNIX® " (Page 110-117)

Documents relatifs