I have two servers and need to copy 87000+ files from old server (Debian 9) to the new server (Debian 10), tried using sftp
but the connection keeps getting dropped midway and it is taking too much time to transfer files (average file-size ~ 10MB). Archiving files is not an option as we have no space on source device to save the archive file. I also need to copy only a specific file-extension for this job. Have tried rsync
but it transferred only ~ 22000 in 20 hours time.
-
I'd tar-gz them and then transfer only one file.– OvermindDec 5, 2019 at 6:23
Add a comment
|
1 Answer
You can use tar without storing it to the disk, just sending stream over the network and untarring there. This can be done with netcat either raw or through encrypted ssh tunnel (-L or -R option). I described the process in this answer, you can easily adapt that to your case.
However, I doubt this will be much faster than rsync. Also note, you can run rsync several times, it'll only send changes, not the whole data set.