Dumb Question - Copying Files and Dirs

Scott Greczkows

Well-Known Member
Feb 5, 2004
72
2
158
I have a dumb question.

I need to move 1 directory and all its subdirectories and files in those directories to another server. Both are using WHM / Cpanel on Redhat Enterprise 3.

Is there an easy way to do this from server to server?

Sorry for the dumb question as I do not know Unix too well.
 

aby

Well-Known Member
May 31, 2005
638
0
166
India
Scott Greczkows said:
I have a dumb question.

I need to move 1 directory and all its subdirectories and files in those directories to another server. Both are using WHM / Cpanel on Redhat Enterprise 3.

Is there an easy way to do this from server to server?

Sorry for the dumb question as I do not know Unix too well.
tar and zip those files ... then scp to the new server. That is very easy.
 

Scott Greczkows

Well-Known Member
Feb 5, 2004
72
2
158
The problem is I dont know how to do that. :)

Can you point me to more detailed instructions? I have a Unix guy who does all my server work for me, but he is off today and I need to fix this myself. :)
 

webignition

Well-Known Member
Jan 22, 2005
1,876
2
166
Scott Greczkows said:
The problem is I dont know how to do that. :)

Can you point me to more detailed instructions? I have a Unix guy who does all my server work for me, but he is off today and I need to fix this myself. :)
'tar', 'gzip' and 'scp' are all programs that you should be able to access from shell.

If you want to know how something works, you can use the 'man' command to display the manual for it. For example: man scp.

However man pages often contain, in my opinion, not enough examples and I often like a good example or two. Try Googling for "tar example", "gzip example" and "scp example" and see what you can find.

In general, you'd use tar and gzip to compress the the contents of the relevant directories and then use scp to transfer them from one server to another. tar and gzip would then be used to uncompress at the other end.

However if the files are not too large, you might be better off just ftping them to your machine and then ftping them on to where they need to go if this is perhaps a more familiar process for you.
 

domtaj

Active Member
Aug 29, 2005
42
0
156
If you are using ftp and there are many files to transfer you can use

prompt

to turn off interactive mode and then either mget or mput to multiple get / put the files in the appropriate direction.