I need help with the cp command (Oracle Linux 4.0)


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers I need help with the cp command (Oracle Linux 4.0)
# 1  
Old 06-08-2007
I need help with the cp command (Oracle Linux 4.0)

Hi,

I use the cp command a lot to take quick disk backups of my Oracle Homes before a patch. However, am a bit confused about the options you can use with the cp command. I have always used the cp -R, but now I have tried out a few different commands on an Oracle Home, and I have not got the results I expected.

The Oracle Home am backing up has a size of 57.7GB, an it has 106911 files, and 11079 sub-folders. I have always believed that the -R option is the correct one to use because that one will copy the special files just the way they are, like symbolic links, and you should get a backup of the same size as the original. While, if using the -r option, the backup will follow the symbolic link and copy the file or folder again, instead of backing up the symbolic link as it is, and then you will get a backup of a bigger size than the original.

So I tried it out on my Oracle Home (all the backups were of a slightly different size, but only a few bytes):
1) cp -r -> 67.9GB 626851 files and 44013 sub-folders
2) cp -R -> 67.9GB 626852 files and 44013 sub-folders
3) cp -Rl -> 67.9GB 626852 files and 44013 sub-folders
4) cp -RL -> 67.9GB 626852 files and 44013 sub-folders
5) cp -a -> 67.9GB 626852 files and 44013 sub-folders

The original is 57.7GB 106911 files and 11079 sub-folders

As you can see, no matter what option of the cp command I used, the size of the backups were the same, and they all are bigger in size, and have more files and folders than the original Oracle Home. Why is that? Can I trust this backup? And what command should I use to be sure that I have a backup exactly the same as the original?

To find the size, number of files and folders I right clicked the folder and chose 'Properties', just like in a Windows environment.

I would appreciate some feed back on this.
Thank you:-)
Regards,
Anne
 
Login or Register to Ask a Question

Previous Thread | Next Thread

3 More Discussions You Might Find Interesting

1. UNIX and Linux Applications

Xalan & Xerces issues for Oracle Linux 6.6 & Solarisstudio12.3 C++ compiler for Linux

Hi Team, I am facing issue while using Xalan & Xerces for my application. Below are my environment details i am using :- Platform:- Oracle Linux 6.6 Compiler :- solarisstudio12.3 C++ compiler for Linux Below are the versions of Xalan & Xerces source code used to build the shared object... (0 Replies)
Discussion started by: agrachirag
0 Replies

2. UNIX for Advanced & Expert Users

Linux fdisk question (Oracle Enterprise Linux)

OS: Oracle Enterprise Linux 6.2 Hypervisor: VMWare workstation 9 I created a VM and attached a 7gb virtual disk to it. Using fdisk , I partioned the disk like below. The filesystems mounted on this is working fine. But I am seeing the message Partition n does not end on cylinder boundary.... (2 Replies)
Discussion started by: kraljic
2 Replies

3. UNIX for Dummies Questions & Answers

oracle 8i for linux

hi all, am considering buying the book 'Oracle 8i for Linux Starter Kit' by Steve Bobrowski ... two questions ... 1) are there any major differences between the Linux version of Oracle and versions for other platforms? 2) this book is $US35 on Amazon, but I thought this was supposed to be a... (1 Reply)
Discussion started by: gan
1 Replies
Login or Register to Ask a Question