# Setting up SFTP for best speeds

**URL:** <https://kopia.discourse.group/t/setting-up-sftp-for-best-speeds/3048>\
**Category:** Support\
**Created:** [June 28, 2024, 4:29am UTC](https://kopia.discourse.group/t/setting-up-sftp-for-best-speeds/3048 "2024-06-28T04:29:37Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![photomatix](https://avatars.discourse-cdn.com/v4/letter/p/a9adbd/32.png) [@photomatix](https://kopia.discourse.group/u/photomatix)\
**Post date:** [June 28, 2024, 4:29am UTC](https://kopia.discourse.group/t/setting-up-sftp-for-best-speeds/3048/1 "2024-06-28T04:29:37Z")

</div>

Getting my Unraid backup setup using Kopia. I’m using rclone with sftp. My backup destination resides on Raspi with a USB 3.0 spinning disk. The backup seemed to go a decent speed but restores are painfully slow (like 100kb/s). Where am I going wrong? Using the docker UI version.

Super new to Kopia, and coming from Duplicacy.

---

<div class="post-metadata">

**Author:** ![kapitainsky](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/kapitainsky/32/535_2.png) [@kapitainsky](https://kopia.discourse.group/u/kapitainsky)\
**Post date:** [June 28, 2024, 4:35am UTC](https://kopia.discourse.group/t/setting-up-sftp-for-best-speeds/3048/2 "2024-06-28T04:35:51Z")

</div>

I suspect that problem is rclone. More precisely rclone/kopia combo. Have had exactly the same experience. Rclone support is experimental.

Either use something supported natively by kopia - like S3 which you can get using `minio`. Or install kopia server on your raspberry Pi - it will be much faster than sftp (which is terrible protocol for such purpose).

---

<div class="post-metadata">

**Author:** ![photomatix](https://avatars.discourse-cdn.com/v4/letter/p/a9adbd/32.png) [@photomatix](https://kopia.discourse.group/u/photomatix)\
**Post date:** [June 28, 2024, 5:02am UTC](https://kopia.discourse.group/t/setting-up-sftp-for-best-speeds/3048/3 "2024-06-28T05:02:56Z")

</div>

Thanks for the quick reply! I think most of that makes sense. So am I understanding that I can install Kopia on the raspi and link Kopia docker UI version (I mistyped and put CLI in my op, but meant UI) on my Unraid server to the raspi install? Or how would the Kopia install on the raspi access the unraid files?

---

<div class="post-metadata">

**Author:** ![kapitainsky](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/kapitainsky/32/535_2.png) [@kapitainsky](https://kopia.discourse.group/u/kapitainsky)\
**Post date:** [June 28, 2024, 6:04am UTC](https://kopia.discourse.group/t/setting-up-sftp-for-best-speeds/3048/4 "2024-06-28T06:04:45Z")

</div>

install kopia server on RPi:

> **[Repository Server](https://kopia.io/docs/repository-server/)**
>
> Fast and Secure Open-Source Backup Software for Windows, Mac, and Linux

And on client(s) connect to server:

 ![Screenshot 2024-06-28 at 08.03.48](https://global.discourse-cdn.com/free1/uploads/kopia/original/2X/a/ab591e8c121602d89cc6119a36f9185b1a138cc4.jpeg)

Another advantage of such setup is that you can run time and network bandwidth consuming tasks like full maintenance etc. on your server and let clients only worry about backing up (and restore)

---

<div class="post-metadata">

**Author:** ![budy](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/budy/32/38_2.png) [@budy](https://kopia.discourse.group/u/budy)\
**Post date:** [June 28, 2024, 12:12pm UTC](https://kopia.discourse.group/t/setting-up-sftp-for-best-speeds/3048/5 "2024-06-28T12:12:14Z")

</div>

Also note that backing up will always go at a higher pace, since drives are designed to optimize writes. However, reading from drives, which involves a lot of searching, will always be slower, even on the most modern drives. Especially, as the drives become filled, reading random data will always come with a penalty.

---

<div class="post-metadata">

**Author:** ![photomatix](https://avatars.discourse-cdn.com/v4/letter/p/a9adbd/32.png) [@photomatix](https://kopia.discourse.group/u/photomatix)\
**Post date:** [June 29, 2024, 2:47am UTC](https://kopia.discourse.group/t/setting-up-sftp-for-best-speeds/3048/6 "2024-06-29T02:47:44Z")

</div>

Thanks everyone! Looks like an easy setup that was right in front of me the whole time!

---

<div class="post-metadata">

**Author:** ![photomatix](https://avatars.discourse-cdn.com/v4/letter/p/a9adbd/32.png) [@photomatix](https://kopia.discourse.group/u/photomatix)\
**Post date:** [July 1, 2024, 4:03am UTC](https://kopia.discourse.group/t/setting-up-sftp-for-best-speeds/3048/7 "2024-07-01T04:03:20Z")

</div>

So I got everything setup and working, but man is it slow just on the backing up side of things. A lot slower than it was on SFTP. I have about 10tb of data. Running a 1gig network, but I’m only seeing about 80mbps used. Any thoughts? CPU on client and server aren’t pegged. Between 40-60% usage. Disks are showing very small reads and writes. 18mb/s etc…

I tried some different numbers on Maximum Parallel Snapshots and Maximum Parallel File reads, but didn’t really seem to make a difference.

Sorry for the noob questions. Certainly a rookie here.

---

<div class="post-metadata">

**Author:** ![dimejo](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/dimejo/32/287_2.png) [@dimejo](https://kopia.discourse.group/u/dimejo)\
**Post date:** [July 1, 2024, 8:00am UTC](https://kopia.discourse.group/t/setting-up-sftp-for-best-speeds/3048/8 "2024-07-01T08:00:36Z")

</div>

Which Raspberry Pi version are you using? Earlier versions had serious performance issues because Ethernet and USB were sharing a controller.

---

<div class="post-metadata">

**Author:** ![kapitainsky](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/kapitainsky/32/535_2.png) [@kapitainsky](https://kopia.discourse.group/u/kapitainsky)\
**Post date:** [July 1, 2024, 2:34pm UTC](https://kopia.discourse.group/t/setting-up-sftp-for-best-speeds/3048/9 "2024-07-01T14:34:27Z")

</div>

Possible that raspberry pi has some performance bottlenecks making it not the best choice for kopia server. What exactly it is hard to say. Maybe lack of encryption hardware support (all models before raspi 5)? Maybe something else. Overall it is fantastic little computer but it has clear limits.

Myself I would also try to use raspi as S3 storage - minio should not have any special requirements for basic setup.

---

<div class="post-metadata">

**Author:** ![photomatix](https://avatars.discourse-cdn.com/v4/letter/p/a9adbd/32.png) [@photomatix](https://kopia.discourse.group/u/photomatix)\
**Post date:** [July 1, 2024, 10:29pm UTC](https://kopia.discourse.group/t/setting-up-sftp-for-best-speeds/3048/10 "2024-07-01T22:29:51Z")

</div>

Running a 4b, 2gb, Bookworm, and Kopia running on docker. You think running native Kopia app on Linux would make any difference?

---

<div class="post-metadata">

**Author:** ![photomatix](https://avatars.discourse-cdn.com/v4/letter/p/a9adbd/32.png) [@photomatix](https://kopia.discourse.group/u/photomatix)\
**Post date:** [July 1, 2024, 10:31pm UTC](https://kopia.discourse.group/t/setting-up-sftp-for-best-speeds/3048/11 "2024-07-01T22:31:49Z")

</div>

I did try the s3 method before using Kopia server. It was equally slow. I’m not sure what the cause. Could be the docker layer. I may try using the native Kopia app and see where that gets me.

---

<div class="post-metadata">

**Author:** ![dimejo](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/dimejo/32/287_2.png) [@dimejo](https://kopia.discourse.group/u/dimejo)\
**Post date:** [July 2, 2024, 2:56pm UTC](https://kopia.discourse.group/t/setting-up-sftp-for-best-speeds/3048/12 "2024-07-02T14:56:15Z")

</div>

> [@photomatix](#):
>
> Running a 4b, 2gb, Bookworm, and Kopia running on docker.

[Performance on the 4b model was significantly improved](https://magpi.raspberrypi.com/articles/raspberry-pi-4-specs-benchmarks) - so this should not be the cause. As you mention 2GB of RAM I’m starting to wonder what your RAM usage looks like. Do you have swap enabled?

---

<div class="post-metadata">

**Author:** ![photomatix](https://avatars.discourse-cdn.com/v4/letter/p/a9adbd/32.png) [@photomatix](https://kopia.discourse.group/u/photomatix)\
**Post date:** [July 4, 2024, 5:19am UTC](https://kopia.discourse.group/t/setting-up-sftp-for-best-speeds/3048/13 "2024-07-04T05:19:28Z")

</div>

I do have swap enabled. I just did a [speedtest.net](http://speedtest.net) test from the pi and I was getting about 60mbps. I think that’s my prob. I’ll have to do some digging and see what the bottleneck is.

Thanks everyone for your suggestions!
