How to Transfer whole file sys from one server to another


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to Transfer whole file sys from one server to another
# 1  
Old 09-16-2008
How to Transfer whole file sys from one server to another

Hi,

well i am not that good in shell prog. and just shifted to do this work.
i was assigned to look all the dir/ sub-dir in a folder like /usr who are the owners, users and groups for the respective dir/sub-dir.
its really a hectic process to see each n every file.
i used the command... find . -type d -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'
but its displaying only the files. i need the info abt the dir,owner,groups,users as well.
for that is there any command.



now i need to create the same file structure in diff servers.
i need help regarding this. i dont have any clue??
for this do i need to create a script? or any other method?
if its a script any suggestions.

need to start this by weekend. so need this ASAP.


can anybody help me in this please. that would be a great help.

waiting for your response...

Thanks,
Krishna

Last edited by krishnadvn; 09-16-2008 at 07:56 PM..
# 2  
Old 09-16-2008
check out the rsync command. search for examples.
# 3  
Old 09-17-2008

...or scp -r
# 4  
Old 09-17-2008
Don't forget our good friend tar (and the path limitations that come with it!)

Code:
cd /sourcedir
tar cvfp - . | (cd /targetdir/; tar xvfp -)

-or-
Code:
cd /sourcedir
tar cvfp - . | ssh user@dest (cd /targetdir/; tar xvfp -)

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Need some help regarding file transfer between server (sftp/scp)

Hi All, Need some help regarding file transfer between server. Suppose we have system-A and system-B. To transfer file from system-A to system-B we usually share the public keys of system-A to system-B and do scp/sftp to transfer a file. Is it possible that public key of system-B can be... (3 Replies)
Discussion started by: abhi_123
3 Replies

2. UNIX for Beginners Questions & Answers

File transfer between Linux server without password

Hi All, I am trying to generate SSH keys for file file transfer automation but facing issue while generating keys. And I tried from another directory but still facing same issue. Error : Open scripts/renu/.ssh/rsa_id failed : Is a directory Saving the key failed... (4 Replies)
Discussion started by: renukeswar
4 Replies

3. UNIX for Dummies Questions & Answers

File Transfer From one server to another server

How to transfer a file from one sevrer to another server ? Please explain it with examples with all alternatives. (4 Replies)
Discussion started by: Awadhesh Kumar
4 Replies

4. UNIX for Dummies Questions & Answers

Transfer file from server B to server C and running the script on server A

I have 3 servers A, B, C and server B is having some files in /u01/soa/ directory, these files i want to copy to server C, and i want to run the script from server A. Script(Server A) --> Files at Server B (Source server) --> Copy the files to Server C(Target Server). We dont have RSA key... (4 Replies)
Discussion started by: kiran_j
4 Replies

5. UNIX for Advanced & Expert Users

Secure Copy - File Transfer between 2 server

Using RCP command we can transfer file from one server to another server. While transferring we can rename the file also e.g. File name = FILE123.txt (lying on Source server = oldserver) Target Server Name = newyour Renamed File = FILE456.txt rcp FILE123.txt newyour:./FILE456.txt... (1 Reply)
Discussion started by: Pash
1 Replies

6. Shell Programming and Scripting

File transfer from Windows machine to Linux server

Hi guys, I need to send a txt file from a windows machine to Linux server. Any help is appreciated.... Thanks... (3 Replies)
Discussion started by: gowrishankar05
3 Replies

7. Shell Programming and Scripting

File transfer from one server to another server in unix

Hi, Can anyone help me. I am a new user in unix. I want to transfer (ftp) a file from one unix server to another server. Kindly help me. more details: server 1 file_name a.lst path: :/temp server 2 path : /develp/temp Thanks, Raj, (2 Replies)
Discussion started by: easterraj
2 Replies

8. HP-UX

File transfer between unix and windows server

hi all, I have two server(Unix tru64 and windows 2003 server). these server's live running now. The win2003server doesn't have ftp server. Also Unix server doesn't have samba. if both server's have ftp server that no problem. How to transfer file from windows server to unix by every... (2 Replies)
Discussion started by: Tlg13team
2 Replies

9. Shell Programming and Scripting

Transfer file from local unix server to remote server

want to remove this thread. thanks (2 Replies)
Discussion started by: indira
2 Replies

10. HP-UX

Transfer file from local unix server to remote server

want to remove the thread thanks (2 Replies)
Discussion started by: indira
2 Replies
Login or Register to Ask a Question