Restic backup -> Backing up my NAS to my Windows HDD (USING WSL)

Currently running (restic 0.16.4 compiled with go1.22.2 on linux/amd64)
Restic is installed on my Windows (which is using WSL) Ubuntu 24 LTS version

restic -r /mnt/d/Test_For_Snapshot_1/ backup sftp Kevsosmooth@192.168.50.149:/docker/copy_this_folder

To begin with I used restic -init <path to folder>

  1. It then proceeded to ask me for the password
  2. Put it in a simple pass word like pass123 just so I can test it
  3. Ran the company that I above which shows sftp inside of it.
    4)Error that I get is
sftp does not exist, skipping
Kevsosmooth@192.168.50.149:/docker/copy_this_folder does not exist, skipping
Fatal: all target directories/files do not exist
  1. I able to use the command
sftp Kevsosmooth@192.168.50.149
Kevsosmooth@192.168.50.149's password:
Connected to 192.168.50.149.
sftp>

Works perfectly fine and I am able to always get to the correct folder .

My repo exsist on /mnt/d/Test_For_Snapshot_1/ and i am simply trying to grab the items from the Nas which exsist at /docker/copy_this_folder

Please if anyone can help me even get remotely close. I am not sure if I need to also download restic on my nas as well as my wsl (which it already exsist on wsl)

Usage:
  restic backup [flags] [FILE/DIR] ...

You can only backup local directories. Not SFTP, nor any other remote cloud system.

You can use SFTP (and few other cloud locations) as your backup destination but not as a source.

So what you attempt to do is to backup directories sftp and Kevsosmooth@192.168.50.149:/docker/copy_this_folder to your local repo. These directories do not exist.

As a workaround you can mount your sftp to local filesystem and backup from the mount point.

Thank you I will try this. Also if you can please help me understand something extremely crucial. I do understand that as a sudo user / non-sudo user the restic will have a different cache for each.

Assume I am only using the non-sudo version for this example

I ran this example command at the moment

restic -r /mnt/d/Nas_Backups backup ./immich --exclude ./immich/postgres -vv

I feel like incremental backup should be a lot faster but lastly these backups with minimal change of about 100mb per 50gb have literally taken me 5 hours or more.

I am backing up immich which essentially they create many sub directories for a lot of things like albums, or uploads, or whatever. But the thing is that I ran this command one after the other to see if its getting better but wow these things are taking 5 hours for each incremental backup. And even with verbose mode one its literally showing me album after album many unchanged ones.

unchanged /immich/upload/library/335d6654-26ee-40ae-ba2b-d6132268cdc7/2024/2024-06-16/IMG_4830.HEIC
unchanged /immich/upload/library/335d6654-26ee-40ae-ba2b-d6132268cdc7/2024/2024-06-16/IMG_4831.HEIC
unchanged /immich/upload/library/335d6654-26ee-40ae-ba2b-d6132268cdc7/2024/2024-06-16/IMG_4832.HEIC
unchanged /immich/upload/library/335d6654-26ee-40ae-ba2b-d6132268cdc7/2024/2024-06-16/IMG_4833.HEIC
unchanged /immich/upload/library/335d6654-26ee-40ae-ba2b-d6132268cdc7/2024/2024-06-16/image000000+1.heic
unchanged /immich/upload/library/335d6654-26ee-40ae-ba2b-d6132268cdc7/2024/2024-06-16/image000000+2.heic
unchanged /immich/upload/library/335d6654-26ee-40ae-ba2b-d6132268cdc7/2024/2024-06-16/image000000.heic
unchanged /immich/upload/library/335d6654-26ee-40ae-ba2b-d6132268cdc7/2024/2024-06-16/video000001.mov
unchanged /immich/upload/library/335d6654-26ee-40ae-ba2b-d6132268cdc7/2024/2024-06-16/
unchanged /immich/upload/library/335d6654-26ee-40ae-ba2b-d6132268cdc7/2024/2024-06-18/IMG_4851.PNG
unchanged /immich/upload/library/335d6654-26ee-40ae-ba2b-d6132268cdc7/2024/2024-06-18/IMG_4852.MOV
unchanged /immich/upload/library/335d6654-26ee-40ae-ba2b-d6132268cdc7/2024/2024-06-18/IMG_4853.MOV
unchanged /immich/upload/library/335d6654-26ee-40ae-ba2b-d6132268cdc7/2024/2024-06-18/
unchanged /immich/upload/library/335d6654-26ee-40ae-ba2b-d6132268cdc7/2024/2024-06-19/4EE63C00-2060-4D22-B7F9-2B963858BE9E.jpg
unchanged /immich/upload/library/335d6654-26ee-40ae-ba2b-d6132268cdc7/2024/2024-06-19/8109bb5c56f044bab393ed570e6df1e2.mov
unchanged /immich/upload/library/335d6654-26ee-40ae-ba2b-d6132268cdc7/2024/2024-06-19/IMG_4857.HEIC
unchanged /immich/upload/library/335d6654-26ee-40ae-ba2b-d6132268cdc7/2024/2024-06-19/IMG_4858.HEIC
unchanged /immich/upload/library/335d6654-26ee-40ae-ba2b-d6132268cdc7/2024/2024-06-19/IMG_4860.HEIC
unchanged /immich/upload/library/335d6654-26ee-40ae-ba2b-d6132268cdc7/2024/2024-06-19/IMG_4861.HEIC

If you backup mounted directory then add --ignore-inode flag to your backup command.

1 Like