Find the answer to your Linux question:
Results 1 to 5 of 5
Dear Linux Gods, Well here is my issue i know about Wget and SCP to some degree, however i do not want to copy the whole site or anything how ...
  1. #1
    Just Joined! Mattchicago's Avatar
    Join Date
    Oct 2009
    Location
    chicago
    Posts
    10

    [SOLVED] - SCP / Wget Folder to Folder Linux To Linux

    Dear Linux Gods,

    Well here is my issue i know about Wget and SCP to some degree, however i do not want to copy the whole site or anything how would this work server to server transfer?

    i need the command (root) to just copy 1 folder to another folder on the new system not the whole website type of thing.

    /var/lib/mailman and i need its contents to be migrated to my other new server
    /var/lib/qmail that one as well

    so what would the command be since i tried

    Code:
    scp -r chicagopromo at 72.37.228.XXX:  /var/lib/mailman
    and it tried copying the whole directory to the that directory i just need a couple folders from 1 site to another site using ssh

    Thanks for you're Help

    Matt

  2. #2
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,281
    Have you tried GOOGLE to find the answer to this question?

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  3. #3
    Just Joined! Mattchicago's Avatar
    Join Date
    Oct 2009
    Location
    chicago
    Posts
    10
    yes but the command i had found it tried copying the whole http directory of my old site (non root) and i need 2 directories in root transfered to the new box from the old box using SSH if possible.

    Matt

  4. #4
    Just Joined!
    Join Date
    Oct 2009
    Posts
    6

    Not sure if this is what you're getting at.

    You are going to have to use scp just the way you have been using it only you will have to use it twice. SCP is just like the cp command in Linux an wont accept arrays of files to be copied.

    That being said, if both of your directories had names that would isolate them from the others in the directory, then you could use wildcards. Anyway,

    Code:
    scp -r /var/lib/mailman root@192.168.0.1:/var/lib/
    that's if /var/lib/mailman didn't exist in the destination. If it did exist in the destination then:

    Code:
    scp -r /var/lib/mailman/* root@192.168.0.1:/var/lib/mailman/
    Just as a tidbit of info, you actually can be on a third computer and have scp transfer from one system to another like this:

    Code:
    scp -rp root@192.168.0.1/var/lib/mailman/* root@192.168.0.2:/var/lib/mailman/
    Oh and you can use -p like I did above to "Preserves modification times, access times, and modes from the original file." Just a few things I found helpful in day to day life

  5. #5
    Just Joined! Mattchicago's Avatar
    Join Date
    Oct 2009
    Location
    chicago
    Posts
    10
    I wanted to say Thank you Very much for that since now its making my life way easier to get my old machine onto my new box.

    Matt

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...