# Rclone serve vs plain SFTP for millions of small files

**URL:** <https://forum.rclone.org/t/rclone-serve-vs-plain-sftp-for-millions-of-small-files/54175>\
**Category:** Help and Support\
**Created:** [August 24, 2026, 9:20am UTC](https://forum.rclone.org/t/rclone-serve-vs-plain-sftp-for-millions-of-small-files/54175 "2026-08-24T09:20:42Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![enolcr](https://forum.rclone.org/letter_avatar_proxy/v4/letter/e/4bbf92/32.png) [@enolcr](https://forum.rclone.org/u/enolcr)\
**Post date:** [August 24, 2026, 9:20am UTC](https://forum.rclone.org/t/rclone-serve-vs-plain-sftp-for-millions-of-small-files/54175/1 "2026-08-24T09:20:42Z")

</div>

I'll migrate ~5TB of millions of small files from AWS EFS to a selfhosted server using rclone. Should I use `rclone serve` on the destination for better performance with small files or is plain SFTP good enough? Curious if anyone has experience / suggestion for this kind of workload.

Related: [Does anyone already compare the performance of rclone vs SFTP in term of uploading speed?](https://forum.rclone.org/t/does-anyone-already-compare-the-performance-of-rclone-vs-sftp-in-term-of-uploading-speed/35304)

rclone 1.75.0

Thanks.

---

<div class="post-metadata">

**Author:** ![asdffdsa](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/848f3c/32.png) [@asdffdsa](https://forum.rclone.org/u/asdffdsa)\
**Post date:** [August 24, 2026, 1:06pm UTC](https://forum.rclone.org/t/rclone-serve-vs-plain-sftp-for-millions-of-small-files/54175/2 "2026-08-24T13:06:39Z")

</div>

hi, sorry, not sure what you need help with?

1. how to perform the migration?
2. how to `rclone serve` the files after the migration has completed?

imo, i would trust not `rclone serve sftp` in production.

plain sftp server is battle tested over many decades and many millions of machines.

one possible advantage of `rclone serve sftp` is pre-caching the names of files and directories in memory, assuming you have enough free memory  
i have a [summary of the two rclone vfs caches](https://forum.rclone.org/t/status-about-using-rclone-for-music-storage-playback-in-2021-access-times-improved/27648/34)

---

<div class="post-metadata">

**Author:** ![ncw](https://forum.rclone.org/user_avatar/forum.rclone.org/ncw/32/18_2.png) [@ncw](https://forum.rclone.org/u/ncw)\
**Post date:** [August 24, 2026, 2:34pm UTC](https://forum.rclone.org/t/rclone-serve-vs-plain-sftp-for-millions-of-small-files/54175/3 "2026-08-24T14:34:16Z")

</div>

That is a lot of small files...

I'm not sure I understand the architecture though.

You have files on EFS and you'll run an EC2 VM to access the files. These appear as an NFS mount, so effectively as local disk as far as rclone is concerned.

You also have a server not at AWS where you want the files to end up.

Assuming your destination server has ssh access then I'd run rclone on the AWS server and push the files over sftp to the dest server. No need to run rclone server .

You would then run rclone check as a final validation that everything transferred properly

---

<div class="post-metadata">

**Author:** ![enolcr](https://forum.rclone.org/letter_avatar_proxy/v4/letter/e/4bbf92/32.png) [@enolcr](https://forum.rclone.org/u/enolcr)\
**Post date:** [August 24, 2026, 3:00pm UTC](https://forum.rclone.org/t/rclone-serve-vs-plain-sftp-for-millions-of-small-files/54175/4 "2026-08-24T15:00:23Z")

</div>

Sorry, I complicate the question by mentioning EFS. I was trying to ask "is rclone serve sftp is more efficient then plain sftp". I'm planning to do my migration exactly as @ncw wrote. And by @asdffdsa 's answer I've learned that rclone serve sftp with dir-cache can help but needs testing on my side.

I'm long time rclone user but never noticed the serve sftp option so i was curious. It seems it's better to use plain sftp if we already have it.

Thanks for the both answers.

---

<div class="post-metadata">

**Author:** ![steffenpoulsen](https://forum.rclone.org/user_avatar/forum.rclone.org/steffenpoulsen/32/940_2.png) [@steffenpoulsen](https://forum.rclone.org/u/steffenpoulsen)\
**Post date:** [August 29, 2026, 2:32pm UTC](https://forum.rclone.org/t/rclone-serve-vs-plain-sftp-for-millions-of-small-files/54175/5 "2026-08-29T14:32:54Z")

</div>

Alternatively, pack the files into a tar stream, send them over the network, and unpack them instantly at the destination without writing a intermediate archive file:

`$ tar cf - source_dir/ | ssh user@remote 'tar xf - -C destination_dir/'`

The overhead for millions of small files can be enormous - perhaps run a couple of tests with a million empty files, just to get a feeling of how your environment and setup handles the overhead.

`$ mkdir transfer_test; for (( i = 0; i < 1000000; i++ )) do > transfer_test/file_$i; done`

If you can't make ssh work, streaming over netcat could perhaps be another way.

`# nc -l -p 8080 | tar -xvf - -C /destination/path/`

`# tar -cvf - /source/path/ | nc target-host-ip 8080`

---

<div class="post-metadata">

**Author:** ![system](https://forum.rclone.org/uploads/default/original/2X/3/39ad3235f6ffec76ccd0c81616bd55697b4c300d.png) [@system](https://forum.rclone.org/u/system)\
**Post date:** [September 28, 2026, 2:33pm UTC](https://forum.rclone.org/t/rclone-serve-vs-plain-sftp-for-millions-of-small-files/54175/6 "2026-09-28T14:33:18Z")

</div>

Closed on September 28, 2026, 2:33pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
