Find the answer to your Linux question:
Results 1 to 3 of 3
Hello All, I am replacing a content server, I have several gig's of data I am copying over from the old server to the new server. What I am wondering ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie AboveNBeyond's Avatar
    Join Date
    Mar 2007
    Posts
    120

    SCP help... server to server retain permissions


    Hello All,
    I am replacing a content server, I have several gig's of data I am copying over from the old server to the new server. What I am wondering is...

    Isn't there a way to scp all the files over and have the files keep there original permissions?

    Thanks in advance...

  2. #2
    Linux Guru bigtomrodney's Avatar
    Join Date
    Nov 2004
    Location
    Ireland
    Posts
    6,133
    Your best bet would be to tar up the files first. You can preserve the permissions and also transferring one file has less overhead on the network than many smaller file.

    Try the p and s switches on tar -
    Code:
    tar -cvfps scp_archive.tar file1 file2 file3 ...

  3. #3
    Linux Newbie AboveNBeyond's Avatar
    Join Date
    Mar 2007
    Posts
    120
    tar -cvfps scp_archive.tar /content/*

    Would this work the same or do I need to list each sub-directory/file?

  4. $spacer_open
    $spacer_close

Posting Permissions

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