16.8. Logical BackupsPhysical backups protect you from physical damage, such as a damaged disk drive. A logical backup protects you from logical damage, such as when your DBA accidentally deletes an important table. Logical backups are done by Oracle's data pump or export utility, which stores the data in a binary file that is useful only to Oracle. Data pump and export are really used only for data exchange between databases. It has a number of disadvantages when using it for backups:
16.8.1. Performing a Logical BackupThe type of export covered here is an export of the entire database, also known as a full export. The commands to do a full export are found in Example 16-8. Substitute the appropriate username, passwd, and file_name. (The username and password need to have the appropriate permissions to do an export.) Example 16-8. Sample database export
This performs a full (every table) export of ORACLE_SID to file_name. For more information on the exp command, consult the manual. 16.8.2. Recovering with a Logical BackupIf you made any logical backups, or exports, using Oracle's exp utility, they may be imported using Oracle's imp utility. In order to use the following command, you must substitute the appropriate username, passwd, and file_name. For level, you need to use system or restore. (When to use these levels is covered next.) $ imp username/passwd inctype= level full=Y file= file_name |