I got a server A, it has three users on it. I need to download a folder's 70 gigs of content into server B. The server only has 90 gigs of space, so compressing, then transferring isn't an option. In my experience rsync
is extremely slow 10x slower than other methods.
I have always used
ssh user@ip "tar zc -C /home/minecraft/multicraft/servers/server2 ." | tar zx
This command is amazing because it opens up a pipe and directly downloads everything you want, at maximum speed. It doesn't slow down from tiny files like rsync does. I've used this to transfer stuff in the fast and it's so quick that the 100 mbps upload is the bottleneck.
Anyway but server A has a user I log into, it also has sudo -i, and finally there is also minecraft, the user files are actually under. The user isn't an actual user, it's just the placeholder for the files for security purposes. I can't login into this user.
So what I must do is, ssh from server B into server A, with one command sudo into root, provide root password, and then perform my usual
ssh user@ip "tar zc -C /home/minecraft/multicraft/servers/server2 ." | tar zx
Please help me almighty computer wizards.