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

Join the conversationComment

Share
Comments

    Results

    Contribute to the conversation

    All fields are required. Comments will appear at the bottom of the article.