Ask the Expert

OS commands for copying files to a backup location

Can you please give me the OS commands to copy my files to my backup location?

I am trying to do a cold backup on three servers on which I have Oracle Collaboration Suite 10g installed, and before doing anything I want to do a cold backup to be able to easily recover my installation in case something happens.

My operating system is Linux Red Hat 4.

    Requires Free Membership to View

First, you'll have to shut down your database as follows:

sqlplus /nolog
connect / as sysdba
shutdown immediate
exit

At that point, you will simply copy the database files with the cp command as follows:

cd /backupdir
cp /sourcedir/file 

Repeate the cp command for each file. When performing a cold backup, you should copy all files listed in the DBA_DATA_FILES, V$LOGFILE and V$CONTROL_FILES views. So query these views before you shut down the database so you do not miss any important database files.

This was first published in September 2005

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: