Need to copy a directory structure from one server to another


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Need to copy a directory structure from one server to another
# 8  
Old 03-08-2011
Quote:
Originally Posted by Renjesh
I need to store "/opt/src" as first character in the array and "/etc/sys" as second and so on ..
Then I need to check if the first element in the array is a dir .. then i will use email parsing to create the same in p server ..
How you can create as you stated above,in this case as well if you don't have permissions on Production server?
# 9  
Old 03-17-2011
I just want to thank to rdcwayx because his response was great for me.
# 10  
Old 03-17-2011
Further to the good point made by "panyam".

Do you have unrestricted "root" access to Shell on both servers? If not, what access do you have?

What is the full hierarchial directory of the "vio" directory mentioned in post #1 ? Can you create directories and files under the parent directory on the target computer?

What in unix command terms is "email parsing".

Are you using some sort of enhanced unix mail on both servers? This question is about whether you can save a file attachment directly to the target server or have some other method in mind.

How big is the "vio" directory?

Does every file and directory owner have the same unix UID and GID on the source and target computers? This is so important when moving archives from one unix server to another. There are advanced techniques which include sorting out the UID and GID issues before creating the archive.

What Operating System and version are the source and target computers?
What Shell do you use on the source and target computers?

Footnote: Depending on what Operating Systems are revealed I'd be more likely to use "cpio" than "tar" because "cpio" will archive any type of file.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Copy Directory Tree from one Server to Another

Hi, I have a serverA with Directory "/opt/app/myfiles" which is 8.5GB with more than 40000 files and 45 folders in it. I wish to transfer the folder "/opt/app/myfiles" tree structure with all the sub-directories and skip all files to another serverB. I would appreciate a command that... (4 Replies)
Discussion started by: mohtashims
4 Replies

2. Shell Programming and Scripting

Copy a directory from a server (UNIX) to a PC (Windows)

Hello, I already do some question about this topic. I already establish the conection from the server (Centus) whit the windows PC using SSH. Now I have two problems: 1- The server always ask me about a password to copy the files to the windows pc, I don't know how to avoid this, if someone can... (2 Replies)
Discussion started by: yeestrada
2 Replies

3. UNIX for Dummies Questions & Answers

Linux Server Network Settings - Share Directory Structure

Hello Unix Gurus Who I Hope Reads This, I have quasi-inherited control over a Linux cluster at a university research lab. The post-doc that set it up is gone, and the person in charge of administering the cluster doesn't know a ton about Linux. Amongst other things, I want to use the cluster... (0 Replies)
Discussion started by: mbl
0 Replies

4. Shell Programming and Scripting

copy the latest file in the remote server's directory

Hi Expert Team, I performed the below piece of code to copy the latest file in the remote server's directory to the same server's other directory. But it is not working properly. How can i handle this? Can you please help me..? ssh ${REMOTE_USERID}@${REMOTE_HOSTNAME} "cp -p `ssh... (3 Replies)
Discussion started by: spkandy
3 Replies

5. Shell Programming and Scripting

copy directory structure to a system on the network

I am trying to write a script which has to copy the directory structure from my system to another system on the network. But I dont want the files to be copied. I think I have to start with copying all subdirectories names in a directory to a system on the network. Here's the case: Source... (1 Reply)
Discussion started by: firefox211
1 Replies

6. Shell Programming and Scripting

Recursion to Copy a Directory structure

I have the below code to recurse through a given file path. I am able to go to the leaf level once recursively but traversing out is not possible as the required varaibles don't have the values on return. Both typeset and local don't work for my variable definitions. I have the o/p of the sample... (2 Replies)
Discussion started by: avrkiran
2 Replies

7. UNIX for Dummies Questions & Answers

copy files with directory structure

i have a text file as. /database/sp/NTR_Update_Imsi_List.sql /database/sp/NTR_Update_Imsi_Range_List.sql /database/sp/NTR_Vlr_Upload.sql /database/tables/StatsTables.sql /mib/ntr.mib /mib/ntr.v2.mib /scripts/operations/ntr/IMSITracer.ph /scripts/operations/ntr/IMSITracer.pl ... (3 Replies)
Discussion started by: adddy
3 Replies

8. UNIX for Advanced & Expert Users

MV files from one directory structure(multiple level) to other directory structure

Hi, I am trying to write a script that will move all the files from source directory structure(multiple levels might exist) to destination directory structure. If a sub folder is source doesnot exist in destination then I have to skip and goto next level. I also need to delete the files in... (4 Replies)
Discussion started by: srmadab
4 Replies

9. UNIX for Dummies Questions & Answers

Copying a Directory Structure to a new structure

Hi all Is it possible to copy a structure of a directory only. e.g. I have a file with the following entries that is a result of a find :- /dir1/dir2/file.dbf /dir1/dir2/dir3/file1.dbf /dir1/file.dbf I want to copy these to a directory and keep the structure however starting at a new dir... (8 Replies)
Discussion started by: jhansrod
8 Replies

10. UNIX for Dummies Questions & Answers

any idea to copy directory structure

I want to copy the durectory structure having subdirectories in it ... would be greatful if anyone could let me know .. thanks in advance (6 Replies)
Discussion started by: myelvis
6 Replies
Login or Register to Ask a Question