$ exp [username]/[password[ file=[anyname].dmp log=[anyname].log owner=[owner_of_db]
E.g.:- exp wso2user/wso2user file=wso2db.dmp log=wso2dberror.log owner=wso2user
To restore the dump which you took, use the below command
$ imp [new user]/[password] file=[dump to be restored].dmp fromuser=[who exported the db] touser=[new user]
E.g.:- imp wso2newuser/wso2newuser file=wso2db.dmp fromuser=wso2user touser=wso2newuser
Note that you need to create a new user using the below commands before issuing the above imp command.
drop user wso2newuser cascade;
Create user wso2newuser identified by wso2newuser account unlock;
grant connect to wso2newuser;
grant create session, dba to wso2newuser;
commit;