Fastest Way to transfer files from a server to PC

So I have a linux server (Ubunut 16.04) and my laptop (16.10) and I want to copy 4k files that are about 40gb in total.

On windows this is easy, just set up a samba share and I get about 100MB/s pretty consistantly. But on Linux samba only gives me a lousy 3MB/s, sftp & ftp give me about 10MB/s.

my router and laptop both have wireless AC so I expect better speeds than that.

So my question what is the fastest protocol to use over the network?

For Unix Systems NFS (Network File System) is what you want to use.

Below is a link from help.ubuntu.com that has a quick start guide for installing NFS and getting it setup on your server/client

https://help.ubuntu.com/lts/serverguide/network-file-system.html

If you want more detailed instructions this also helps:

https://help.ubuntu.com/community/SettingUpNFSHowTo

3 Likes

I used to use SMB for all my network transfers and was getting very tired of the lack in performance. I discovered NFS a year or so ago and never looked back.

The links @MichaelLindman provided should give you everything you need (pretty sure they're the same ones i used).

Let us know how things work out for you :)

2 Likes

thank you so much, thats exactly what I'm looking for!

1 Like

No problem :)

NFS is a really nice solution on Linux and I prefer it not only for the performance increase but because it incorporates into the filesystem really well to the point that an untrained person may not be able to tell that it is a network attached mount which makes using it on Linux much easier.

For example, I have a storage drive on my server mounted to /mnt/storage and I mount it on my client machine as /mnt/nfs-storage which means I can do something like this to backup files/whole directories from my client:

rsync -rcv /mnt/stroage/directory /mnt/nfs-storage/directory

The /mnt/storage mount is storage drive on the client and /mnt/nfs-storage is the NFS mount point from the server.

You can do this and so much more cool stuff because as far as the terminal is concerned it is just another mount point which makes it really flexible.

1 Like

Open the Server and take out the drive and put it in the PC. Takes around 10 minutes(if you do it slow) and then you transferred with a speed of 68.267 MB/s

1 Like

my laptop doesn't have a satabay, and that would be inconvient I want to be able to easily copy files in the future as well.

Hey can I pick your brain.

So I have a nfs share on my server under /var/nfs/general, and I want to link my storage drives to it, they're located under /mnt/[Storage, Plex, Data]

I tried running ln -s on the server, but my laptop says those are not valid locations, how would I do such linking, or do I need to create the nfs share under mnt

but if i read it correct from Windows to Windows its 100MB/s

Linux server to/from Windows desktop using samba = 100mb/s +- some overheard, but generally always faster than 80mb/s

sftp = 10mb/s or less (even from windows)
samba on linux (linux to linux) 3MB/s

samba on Linux is not used. For Linux you can use SSH.
Can you try SSH transfer from Linux to Linux that should be good speed too.

You just login to SSH by typing in the adressbar ssh://
On the other Linux a ssh service most run. If its not running. systemctl start sshd (in a terminal with root access) or if it doesn't exist you need to install it.

sftp, is SSH file transfer, and I get abysmal speed

I got nfs working, but I'm only getting 20MB/s now, which is 160mb/s which sound about right for wireless AC.

@MichaelLindman thank you for showing me nfs, was very easy to set up too! do which to mention, the crossmnt option was very helpful in the /etc/exports file.

true about sftp. But didn't though you used ssh as sftp (tho i might be wrong and probably SSH is the only sftp way).
my mistake.

10mb/s is indeed slow....so didn't even expect that to be SSH....
but you got a working way now?

1 Like

yup. Very happy.

Now I just need some ECC ram, some new drives and a C chipset motherboard to full swag out this linux server

Symbolic links are just a pointer to the relative path and as I said before NFS is transparent as far as the client is concerned. As an example if you had the directory /mnt/Plex on your client and created a symbolic on your server from /mnt/Plex to /mnt/nfs/general the client will go to the /mnt/Plex directory on the client machine and not the server, that is why you are getting the error message, the link is pointing to the location on the client machine which doesn't exist.

If you are creating the NFS shares to directories I would recommend creating separate entries for path or to the top directory, such as /mnt/ on the server to /mnt/nfs-mnt on the client for example.

I must admit, I do this fairly often when I'm transferring massive files from one drive to another, its less convenient in some cases but can sure make the transfer take much less time.

1 Like

I figured it out :)

have to add /mnt to the etc/exports, then add crossmnt to the option list to get all sub directories properly

1 Like

but but still only 10 MB over SSH is slow. while samba is faster hits 100 MB. You sure the difference is this huge? or maybe that a Ethernet cable doesn't work correctly? Something must be wrong on a different level here.

my laptop is over wifi, 20MB/s over AC is pretty good.

On my windows PC filezilla gives me 10mb/s at best, over lan, vs 100~ with Samba, its a huge difference

but the 100 10 difference is same socket on the router with same cables?

yes, everything hardware wise the same