B
B
brar2015-11-28 04:23:14
linux
brar, 2015-11-28 04:23:14

Is there any way to archive and copy from one server to another on the fly?

Two servers. Each has 2GB RAM and 50 GB disk. On one of them, a directory with small and not very files of 29 GB in size. Simple copying takes a lot of time due to the large number of files. Create an archive for further copying - there is not enough space.
Is it possible to do it in such a way as to archive on the fly and immediately send the stream (or pipe, I don’t know how to put it more correctly) to the network to the second server, and there, on the second server, respectively, unzip it on the fly.
Mapping the directory of one of the servers to another was done via sshfs.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
DevMan, 2015-11-28
@brar

serverfault.com/questions/208300/quickest-way-to-t...
personally I would use good old rsync with compression .

I
Igor, 2015-11-28
@fredyk

Definitely Rsync =)

O
Oleg Tsilyurik, 2015-11-28
@Olej

Is it possible to do it in such a way as to archive on the fly and immediately send the stream (or pipe, I don’t know how to put it more correctly) to the network to the second server, and there, on the second server, respectively, unzip it on the fly.

This has been done for many decades (in various UNIX-like OS) by good old tar.
tar - Tape ARchiver. file hierarchy converter to "magnetic tape format" (hence Tape), to a linear sequence of bytes.
And then (preferably in your case) compress the result of tar with any compressor convenient for you: gzip, bzip2, 7zip, ...
On the receiving end, do the opposite.
And you transfer it in any way convenient for you: SSH, FTP, NFS, ...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question