Find the answer to your Linux question:
Results 1 to 3 of 3
I have some very large directories (user images, videos, songs) that need to be transferred to the new host. TAR seems to take FOREVER!! I've been archiving my user images ...
  1. #1
    Just Joined!
    Join Date
    Jun 2009
    Posts
    3

    SCP while TAR is archiving

    I have some very large directories (user images, videos, songs) that need to be transferred to the new host.

    TAR seems to take FOREVER!! I've been archiving my user images directory for nearly 12 hours now and the archive is only 8GB out of the 36GB directory. I tried to TAR another directory while it's going but it slowed it to a crawl.

    I don't imagine this is possible but can I use SCP while the TAR file is still being filled? I don't think I can do that but it would be great to atleast kill 2 birds with one stone. Any suggestions on speeding things along?

  2. #2
    Linux Guru
    Join Date
    Nov 2007
    Location
    Córdoba (Spain)
    Posts
    1,513
    Are you using compression? If so, you might want to use 7z, or if you use tar, use gz instead of bz2, it's *much* faster.

    I am not sure about your second question.

  3. #3
    Linux Newbie
    Join Date
    Mar 2009
    Posts
    228
    Quote Originally Posted by undecided09 View Post
    I don't imagine this is possible but can I use SCP while the TAR file is still being filled?
    If I understand the question correctly, you want to start copying the tar file while it's still being built. If so, probably not.

    I suggest you use a pipe and avoid creating a tar file. The command would look something like this:

    Code:
    cd /path/to/source; tar -czf - .  | ssh host "cd /path/to/dest; tar -xzf -"

Posting Permissions

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