Restic 0.16.5 on Windows server 2012 R2

Hello! in win server 2012R2 when run backup i get error:
write failed: write /dev/stdout: A device attached to the system is not functioning.
write failed: write /dev/stdout: A device attached to the system is not functioning.
write failed: write /dev/stdout: A device attached to the system is not functioning.

After backup created, i see snaphots, and get error:

enter password for repository:
repository 40a9fbe3 opened (version 2, compression level auto)
ID Time Host Tags Paths

error printing: write /dev/stdout: A device attached to the system is not functioning.

Command for backup: restic.exe -r sftp:pgs@192.168.11.98:/var/lib/backuppc/restic backup d:\docs

How can I fix this?

maybe this is a problem with openSSH which I recently installed and restic is not to blame

You might find the following guide helpful:

I would start by testing that you can sftp from the command line in Windows. However, I believe OpenSSH on Windows is only supported beginning with Server 2016, so I don’t think you’re going to be able to get SFTP working on Windows Server 2012 R2.

I had no trouble using restic on Windows Server 2012 R2 using a rest-server backend.

VS Code has a guide on how to get VS Code working with ssh that’s included in the Git for Windows package, but I’m not sure whether that includes sftp or just ssh. See: Visual Studio Code Remote Development Troubleshooting Tips and Tricks

Hmm that repository URL seems a bit off. Try this:
-r "sftp://pgs@192.168.11.98//var/lib/backuppc/restic"

Thanks!
I’ll try both options, thank you very much!