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 Schema Backup Using Data Pump Export (expdp)
Oracle Data Pump saves dump files on the server. Before it can be used, a privileged user must configure a directory to store the dump files.
This information applies to Oracle 10g and 11g.
Creating an Oracle Directory for Data Pump Files
The following SQL commands create a directory and give access to the connect10 user:
SQL CREATE DIRECTORY dumpdir_brickst AS '/home/brickst/dumpfiles';
SQL GRANT READ, WRITE ON DIRECTORY dumpdir_brickst TO connect10;
They should be run by a privileged user like system. You should also ensure that the directory exists; Oracle will not create it.
Exporting a Schema with Data Pump
Once the directory has been created, you can export the connect10 schema with the following command line:
expdp connect10 DIRECTORY=dumpdir_brickst DUMPFILE=connect10.dmp CONTENT=METADATA_ONLY
This command will save the schema backup to /home/brickst/dumpfiles/connect10.dmp.
The "CONTENT=METADATA_ONLY" argument tells the program to export the schema's objects definitions only. Other options for CONTENT are ALL and DATA_ONLY.
Note: the binary dump files produced by expdp can typically be compressed to about 25% of their original size.
Oracle. Data Pump Overview - File Allocation. Retrieved from http://docs.oracle.com/cd/E11882_01/server.112/e22490/dp_overview.htm#i1007107.
Oracle. Data Pump Export. Retrieved from http://docs.oracle.com/cd/E11882_01/server.112/e22490/dp_export.htm.