Detail
So, when re-installing the OS on my laptop, I need to backup Oracle XE, and later restore when the new OS is in place. To do this i'm using the backup and restore utilities included with XE. They are available from the Applications:Oracle:Backup menu in Gnome.
First of all, you need to use system-config-users as root to add your user login to the dba group. This allows you to run backup and restore.
Backup:
backup.sh and restore.sh are typically stored here:
oracle@flask:/usr/lib/oracle *>find . -name backup.sh
./xe/app/oracle/product/10.2.0/server/config/scripts/backup.sh
The backup uses RMAN - and that is a server side process. So - before you can backup - you have to login to oracle, and set the 'flash backup area'. This is the default area where oracle will backup to (and later we'll set it as the place to restore from).
Details can be found here:
http://download.oracle.com/docs/cd/B25329_01/doc/admin.102/b25107/storage.htm#CIHEHCGI
But basically, do this:
Create a directory where you want your data to be backed up, and then chown it to oracle:dba. Next, set the directory as the flash backup area in oracle:
$ sqlplus / as sysdba
SQL> alter system set db_recovery_file_dest='/mnt/data/sys.backup.21dec2008/db.backup/oracle_xe_flashbackup';
System altered.
SQL> @?/sqlplus/admin/movelogs;
Next, run backup. Either by running the script, or executing it from the XE Gnome menu item. Go to the disk, and confirm that the data exists there...
Now - reinstall the system. ---
Restore
|