- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: Single cmdline shell for copying all dbf's, ct...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-19-2006 09:23 PM
тАО11-19-2006 09:23 PM
Single cmdline shell for copying all dbf's, ctl file recursively from one system to another.
I have 2 system with same filesystem structure. I need to clone my database that I want to copy all the dbf, ctl files from one system to another. I am not supposed to make use of rcp.
I tried using scp -r find /u01/oradata/omc/srs_1 -name "*.dbf" oracle@system2:${PWD}
from system2.
Althogh it tried copying files across it created a new directory under /u01/oradata/omc/omc/srs_1/srs_1/ and then copied all the files.
I dont want to rely on this command. Please give me any other command that does a clean copying of all dbf files within another system.
For example on system1, I have
/u01/oradata/omc/srs_1/srs_1_a.dbf
/u01/oradata/omc/srs_2/srs_1_a.dbf
/u01/oradata/omc/ctl/ctl01.ctl
I want to copy all of these files to system2 which has same file structure and on the same area.
Thanks,
Srikanth A
- Tags:
- scp
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-19-2006 09:38 PM
тАО11-19-2006 09:38 PM
Re: Single cmdline shell for copying all dbf's, ctl file recursively from one system to another.
you could combine find and tar to backup your files with absolute pathnames and copy the tar file. Beware of the normal 2Gb limit.
That way once you tar -x on the target machine the files are written to their proper locations.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-19-2006 09:43 PM
тАО11-19-2006 09:43 PM
Re: Single cmdline shell for copying all dbf's, ctl file recursively from one system to another.
Yang
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-19-2006 09:43 PM
тАО11-19-2006 09:43 PM
Re: Single cmdline shell for copying all dbf's, ctl file recursively from one system to another.
from system 1 under ksh or bash
scp $(find /u01/oradata/omc \( -name "*.dbf" -o -name "*.ctl" \) -print ) oracle@system2:/
Jean-Yves
- Tags:
- find
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-19-2006 10:46 PM
тАО11-19-2006 10:46 PM
Re: Single cmdline shell for copying all dbf's, ctl file recursively from one system to another.
The scp command doesnt work. It is trying to copy everything in the root directory!!!.
Thanks,
Srikanth A
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-19-2006 11:44 PM
тАО11-19-2006 11:44 PM
Re: Single cmdline shell for copying all dbf's, ctl file recursively from one system to another.
second try :
scp $(find /u01/oradata/omc \( -name "*.dbf" -o -name "*.ctl" \) -print ) oracle@system2:/u01/oradata/omc
Jean-Yves Picard
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-20-2006 08:55 PM
тАО11-20-2006 08:55 PM
Re: Single cmdline shell for copying all dbf's, ctl file recursively from one system to another.
first put it 'begin backup mode'
copy all file :dbf, redo, make your new ctl file
and copy the archivelog file since the begin of copy
flag_arch=/tmp/Arch_${NEW_ORACLE_SID}
rm -f ${flag_arch}
touch ${flag_arch}
find ${ACTUAL_DIR} -type f -newer ${flag_arch} -exec scp {} ${NEW_SERVER}:${NEW_DIR} \
;
make a recover
and make end backup.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-20-2006 11:09 PM
тАО11-20-2006 11:09 PM
Re: Single cmdline shell for copying all dbf's, ctl file recursively from one system to another.
the ideal method would be to use the Duplicate option in RMAN.
If you have metalink access, please refer to note: 388431.1 - "Creating a Duplicate Database on a New Host".
The steps listed in the note are:
1. Backup the primary database.
2. Determine how much disk space will be required.
3. Ensuring you have enough space on your target server.
4. Making the backup available for the duplicate process.
5. Creating the init.ora & administration directories for the duplicate database.
6. Ensuring SQL*NET connections to primary database and RMAN catalog are working.
7. Prepare RMAN duplicate script.
8. Execute the RMAN script.
hope this helps too!
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-21-2006 05:16 AM
тАО11-21-2006 05:16 AM
Re: Single cmdline shell for copying all dbf's, ctl file recursively from one system to another.
-----------------------------
Copy boxA:/dir1/A to boxA:/dir342/A.
On box A
cd /dir1
find A -print | cpio -pdumvc /dir342/.
---------------------------------
Copy boxA:/dir1/A to BOXB:/dir342/A.
On BOXB
make sure directory /dir342 exists and has the correct permissions.
On box A
cd /dir1
find A -print | cpio -odumvc | /usr/bin/ssh user@BOXB \
"cd /dir342;/usr/bin/cpio -idumvc"
man find
man cpio
man ssh
steve
- Tags:
- cpio