LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Closed Thread
  Search this Thread
Old 10-20-2010, 05:47 PM   #1
blainemiller
Member
 
Registered: Dec 2003
Posts: 78

Rep: Reputation: 1
Transfer large number of files host to host


Hello....

I have two servers, one has an empty / and the other has a subdirectory with a large number (4 gig) with many, many files. I need a way to transfer the files en masse from the server with the large number of files to the one that is essentially blank.

I don't have space on the used host to simply gzip all the files. I've googled this and see that there may be some combination of tar and/or gzip that will let me do this with some sort of redirection.

I really need and example line of how this can be accomplished. If my explanation seems rather sparse, I can supply more details.

Thanks!

Blaine
 
Old 10-20-2010, 06:03 PM   #2
sag47
Senior Member
 
Registered: Sep 2009
Location: Raleigh, NC
Distribution: Ubuntu, PopOS, Raspbian
Posts: 1,899
Blog Entries: 36

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
Boot to a live CD on the empty host. Set up an NFS server on the populated host sharing it's whole drive. Then mount the empty host drive on the live CD. Then mount the NFS drive on the live CD. Then you can dd the NFS drive to the unpopulated hosts drive. You might want to zero the free space on the populated host drive with dd.

The catch is the empty drive must be equal or larger in size to the populated host. You can expand the partition later but just in case of data corruption do not delete the old host drive which is populated until you're sure you've got all your data. That solution is essentially OS independent because dd will just grab and write blobs of data from disks.

Last edited by sag47; 10-20-2010 at 06:05 PM.
 
Old 10-20-2010, 06:05 PM   #3
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Assuming you have sshd running on at least one of the machines you can use scp or rsync (over ssh)

Eg using rsync.
Code:
user@sourcehost% rsync -auv -e ssh /path/to/dir/ desthost:/path/to/some/dir/
The above will work if you have sshd running on the destination machine. If you only have sshd running on the source machine you would just do something like the following

Code:
user@desthost% rsync -auv -e ssh sourcehost:/path/to/dir/ /path/to/some/dir/
You can read the rsync man page for details.

Cheers,

Evo2.
 
Old 10-20-2010, 09:01 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.

http://www.linuxquestions.org/questi...o-host-839359/
 
  


Closed Thread

Tags
files, tar, transfer



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
configuring host.allow & host.deny files gardenair Linux - Newbie 7 05-11-2010 06:27 PM
ext3 performance -- very large number of files, large filesystems, etc. td3201 Linux - Server 5 11-25-2008 09:28 AM
How Do I Transfer Files From Ubuntu (Host) and XP (Guest) ?? taurusx5 Linux - Software 2 04-11-2008 01:41 AM
Required to achieve host to host communication via USB file transfer cable may1284 Linux - General 1 03-14-2007 04:02 PM
Kmail ' Connection to host broken ' with large files from Gmail vangelis Linux - Software 0 10-22-2005 07:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration