The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Dumb Question - Copying Files and Dirs

Discussion in 'General Discussion' started by Scott Greczkows, Nov 11, 2005.

  1. Scott Greczkows

    Scott Greczkows Well-Known Member

    Joined:
    Feb 5, 2004
    Messages:
    56
    Likes Received:
    0
    Trophy Points:
    6
    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.
     
  2. aby

    aby Well-Known Member

    Joined:
    May 31, 2005
    Messages:
    638
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    tar and zip those files ... then scp to the new server. That is very easy.
     
  3. Scott Greczkows

    Scott Greczkows Well-Known Member

    Joined:
    Feb 5, 2004
    Messages:
    56
    Likes Received:
    0
    Trophy Points:
    6
    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. :)
     
  4. webignition

    webignition Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    36
    '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.
     
  5. domtaj

    domtaj Active Member

    Joined:
    Aug 29, 2005
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    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.
     
Loading...

Share This Page