Before You Begin: Before executing these commands, set the following environment variable to ensure that Oracle uses the UTF-8 character set:
You can replace the language ('American') with your language setting (e.g. 'English'), and you can replace the territory ('America') with your territory setting.
However, you should always use AL32UTF8 as the character set. For more information, see https://www.oracle.com/technetwork/products/globalization/nls-lang-099431.html
Oracle's imp and exp programs can be used to backup and restore Oracle databases. Oracle recommends the newer expdp and impdp programs, but these are not supported on cloud platforms like Amazon RDS.
Backup Database using exp
Backup data and schema for a single database user: connect10
exp USER/PASS@ORCL OWNER=connect10 CONSISTENT=y FILE=backup.dmp
Backup schema-only (no data) for a single database user: connect10
exp USER/PASS@ORCL OWNER=connect10 CONSISTENT=y ROWS=n FILE=backup.dmp
Note that the USER used to authenticate to the Oracle DB can be different from the OWNER that is being exported; the USER could be system or some other privileged account.
Restore Database using imp
The imp program will load data into an Oracle schema user account. The schema user should have no objects defined to avoid collisions.
imp USER/PASS@ORCL FILE=backup.dmp FROMUSER=connect10 TOUSER=connect10
FROMUSER should match the OWNER when the backup.dmp file was created.
TOUSER is the name of the Oracle schema account where the data will be imported.