# Set up Kopia on SFTP Backend using rsync.net as a provider

**URL:** https://kopia.discourse.group/t/set-up-kopia-on-sftp-backend-using-rsync-net-as-a-provider/3313
**Category:** Support
**Created:** [September 29, 2024, 11:10am UTC](https://kopia.discourse.group/t/set-up-kopia-on-sftp-backend-using-rsync-net-as-a-provider/3313 "2024-09-29T11:10:22Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![corrode1690](https://avatars.discourse-cdn.com/v4/letter/c/bb73d2/32.png) [@corrode1690](https://kopia.discourse.group/u/corrode1690)
#### Post date: [September 29, 2024, 11:10am UTC](https://kopia.discourse.group/t/set-up-kopia-on-sftp-backend-using-rsync-net-as-a-provider/3313/1 "2024-09-29T11:10:22Z")

</div>

Hi.  
I tried to set up Kopia using SFTP but I wasn’t able to. I got the error below:

```auto
WARN unable to write diagnostics blob: unable to complete PutBlob(_log_20240929112901_1ff3_1727605741_1727605753_1_87bb58ec4fa77aea11bc866c6add7128) despite 10 retries: cannot create temporary file: cannot create directory: can't re-create top-level directory ./backups/kopia/test: top-level directory not found
ERROR error populating repository: error flushing writer: error flushing manifests: unable to write content: unable to create pending pack: unable to get session ID: unable to write session marker: unable to write session marker: s8c587722df979bb11cd5dbd635ffe711-s0ca56713703d729612d: unable to complete PutBlob(s8c587722df979bb11cd5dbd635ffe711-s0ca56713703d729612d) despite 10 retries: cannot create temporary file: cannot create directory: can't re-create top-level directory ./backups/kopia/test: top-level directory not found

```

I did try creating the folder path on my SFTP Provider manually before setting the path in Kopia but that hasn’t worked

Any ideas on what I should do?

---

<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: [September 29, 2024, 1:15pm UTC](https://kopia.discourse.group/t/set-up-kopia-on-sftp-backend-using-rsync-net-as-a-provider/3313/2 "2024-09-29T13:15:17Z")

</div>

Maybe start with posting details what exactly you are doing? Nobody can see your screen.

---

<div class="post-metadata">

### Author: ![corrode1690](https://avatars.discourse-cdn.com/v4/letter/c/bb73d2/32.png) [@corrode1690](https://kopia.discourse.group/u/corrode1690)
#### Post date: [September 30, 2024, 3:10pm UTC](https://kopia.discourse.group/t/set-up-kopia-on-sftp-backend-using-rsync-net-as-a-provider/3313/4 "2024-09-30T15:10:21Z")

</div>

```auto
root@example:~/.ssh# kopia repository create sftp --path=./backups/kopia/test --host=example.rsync.net --username=example --keyfile=/root/.ssh/id_ed25519 --known-hosts=/root/.ssh/known_hosts
Enter password to create new repository: 
Re-enter password for verification: 
Initializing repository with:
  block hash: BLAKE2B-256-128
  encryption: AES256-GCM-HMAC-SHA256
  splitter: DYNAMIC-4M-BUZHASH
Connected to repository.

NOTICE: Kopia will check for updates on GitHub every 7 days, starting 24 hours after first use.
To disable this behavior, set environment variable KOPIA_CHECK_FOR_UPDATES=false
Alternatively you can remove the file "/root/.config/kopia/repository.config.update-info.json".

Retention:
  Annual snapshots: 3 (defined for this target)
  Monthly snapshots: 24 (defined for this target)
  Weekly snapshots: 4 (defined for this target)
  Daily snapshots: 7 (defined for this target)
  Hourly snapshots: 48 (defined for this target)
  Latest snapshots: 10 (defined for this target)
  Ignore identical snapshots: false (defined for this target)
Compression disabled.

To find more information about default policy run 'kopia policy get'.
To change the policy use 'kopia policy set' command.

NOTE: Kopia will perform quick maintenance of the repository automatically every 1h0m0s
and full maintenance every 24h0m0s when running as root@example.

See https://kopia.io/docs/advanced/maintenance/ for more information.

WARN unable to write diagnostics blob: unable to complete PutBlob(_log_20240929112901_1ff3_1727605741_1727605753_1_87bb58ec4fa77aea11bc866c6add7128) despite 10 retries: cannot create temporary file: cannot create directory: can't re-create top-level directory ./backups/kopia/test: top-level directory not found
ERROR error populating repository: error flushing writer: error flushing manifests: unable to write content: unable to create pending pack: unable to get session ID: unable to write session marker: unable to write session marker: s8c587722df979bb11cd5dbd635ffe711-s0ca56713703d729612d: unable to complete PutBlob(s8c587722df979bb11cd5dbd635ffe711-s0ca56713703d729612d) despite 10 retries: cannot create temporary file: cannot create directory: can't re-create top-level directory ./backups/kopia/test: top-level directory not found

```

---

<div class="post-metadata">

### Author: ![corrode1690](https://avatars.discourse-cdn.com/v4/letter/c/bb73d2/32.png) [@corrode1690](https://kopia.discourse.group/u/corrode1690)
#### Post date: [October 7, 2024, 8:48pm UTC](https://kopia.discourse.group/t/set-up-kopia-on-sftp-backend-using-rsync-net-as-a-provider/3313/5 "2024-10-07T20:48:32Z")

</div>

Here is the link to the errors. I experience when trying to set up the SFTP Backend

> **[PrivateBin](https://privatebin.net/?21eda6a5ad42314b#A19uy8jk62e9ZNmEmqSSy7HhswPWLtt8wa893oCNMFxa)**
>
> Visit this link to see the note. Giving the URL to anyone allows them to access the note, too.

---

<div class="post-metadata">

### Author: ![corrode1690](https://avatars.discourse-cdn.com/v4/letter/c/bb73d2/32.png) [@corrode1690](https://kopia.discourse.group/u/corrode1690)
#### Post date: [October 15, 2024, 4:10pm UTC](https://kopia.discourse.group/t/set-up-kopia-on-sftp-backend-using-rsync-net-as-a-provider/3313/6 "2024-10-15T16:10:54Z")

</div>

Hi. Any answer to what I put below?

---

<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: [October 16, 2024, 6:55am UTC](https://kopia.discourse.group/t/set-up-kopia-on-sftp-backend-using-rsync-net-as-a-provider/3313/7 "2024-10-16T06:55:25Z")

</div>

You would actually need to look at the logs from your FTP server, as it seems that there’s a permission error at that end. Kopia is only reporting its inability to write to that SFTP target.

---

<div class="post-metadata">

### Author: ![corrode1690](https://avatars.discourse-cdn.com/v4/letter/c/bb73d2/32.png) [@corrode1690](https://kopia.discourse.group/u/corrode1690)
#### Post date: [October 16, 2024, 12:16pm UTC](https://kopia.discourse.group/t/set-up-kopia-on-sftp-backend-using-rsync-net-as-a-provider/3313/9 "2024-10-16T12:16:22Z")

</div>

Alright. On the provider I am using they don’t allow root access but via an account I am given.

Although, on the machine I wish to backup from is using the root user to perform the backup while the machine I wish to back to is using a specific non root user. Could that effect it?

---

<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: [October 16, 2024, 12:43pm UTC](https://kopia.discourse.group/t/set-up-kopia-on-sftp-backend-using-rsync-net-as-a-provider/3313/10 "2024-10-16T12:43:21Z")

</div>

Forget kopia for a moment and try with whatever ftp client you prefer (e.g. FileZilla). Does it work? Can you create dirs and send files? Using the same credentials you tried with kopia. If does not work then you have to solve your sftp access first.

---

<div class="post-metadata">

### Author: ![corrode1690](https://avatars.discourse-cdn.com/v4/letter/c/bb73d2/32.png) [@corrode1690](https://kopia.discourse.group/u/corrode1690)
#### Post date: [October 19, 2024, 4:53pm UTC](https://kopia.discourse.group/t/set-up-kopia-on-sftp-backend-using-rsync-net-as-a-provider/3313/12 "2024-10-19T16:53:42Z")

</div>

Let me give that a try when I can.

---

<div class="post-metadata">

### Author: ![corrode1690](https://avatars.discourse-cdn.com/v4/letter/c/bb73d2/32.png) [@corrode1690](https://kopia.discourse.group/u/corrode1690)
#### Post date: [October 19, 2024, 5:08pm UTC](https://kopia.discourse.group/t/set-up-kopia-on-sftp-backend-using-rsync-net-as-a-provider/3313/13 "2024-10-19T17:08:54Z")

</div>

So. I have tried via Username and Password and I was able to create and upload files using my storage provider account. Let me give public key authentication in Filezilla a try.

---

<div class="post-metadata">

### Author: ![corrode1690](https://avatars.discourse-cdn.com/v4/letter/c/bb73d2/32.png) [@corrode1690](https://kopia.discourse.group/u/corrode1690)
#### Post date: [October 19, 2024, 8:34pm UTC](https://kopia.discourse.group/t/set-up-kopia-on-sftp-backend-using-rsync-net-as-a-provider/3313/14 "2024-10-19T20:34:48Z")

</div>

Solution to this was to contact my provider on what the right path to create folders was in  
Which ended up working
