Restic - Hangs on finalizing index?

Hello all-

I’m trying to access an existing repository via sftp. The repository was created from Ubuntu Bionic, which I believe is Restic v0.8.3.

While I’m able to sftp into the remote host and access the files without issue, Restic just seems to hang when trying to list snapshots (or any other operations)…

DRea@drea-giga-win10 MINGW64 ~
$ restic version
restic 0.13.1 compiled with go1.18 on windows/amd64

DRea@drea-giga-win10 MINGW64 ~
$ sftp -P 7387 drea@192.168.15.100
Connected to 192.168.15.100.
sftp> ls home/restic-repo-tf1fs/
home/restic-repo-tf1fs/config            home/restic-repo-tf1fs/data              home/restic-repo-tf1fs/index
home/restic-repo-tf1fs/keys              home/restic-repo-tf1fs/locks             home/restic-repo-tf1fs/snapshots
sftp> quit

DRea@drea-giga-win10 MINGW64 ~
$ restic.exe -vvvv -r sftp://drea@192.168.15.100:7387/home/restic-repo-tf1fs snapshots
<wait arbitrary duration>
<ctrl+c>
signal interrupt received, cleaning up

Am I doing something wrong here? Is there a backwards compatibility breakage somewhere between 0.8.3 and 0.13.1? Any reason to expect it wouldn’t work from a Windows client to a Linux-created repo?

Thanks,
Dave

PS - I let this run overnight last night, so it doesn’t seem to be a “multiple minutes” / just-didnt-wait-long-enough situation…

SFTP should work between Windows and Linux. The best way to debug this is probably to upgrade to restic 0.14.0 and then create a debug log: DEBUG_LOG=logfile.txt restic .... Maybe that sheds some light on what is going on.

Thanks for the advice - I downloaded 0.14.0 and re-ran, leaving it for 10 minutes or so before interrupting. The log file remained 0b long until I sent the SIGINT.

It appears to be connecting and finding the repository without issue, but hangs at finalizing index:

<snip>
2022/08/30 08:07:08 backend/layout.go:139	backend.ParseLayout	1	parse layout string "" for backend at home/restic-repo-tf1fs
2022/08/30 08:07:08 backend/layout.go:99	backend.DetectLayout	1	detect layout at home/restic-repo-tf1fs
2022/08/30 08:07:08 backend/layout.go:117	backend.DetectLayout	1	found default layout at home/restic-repo-tf1fs
2022/08/30 08:07:08 backend/layout.go:163	backend.ParseLayout	1	layout detected: <DefaultLayout>
2022/08/30 08:07:08 sftp/sftp.go:145	sftp.Open	1	layout: <DefaultLayout>
2022/08/30 08:07:08 sftp/sftp.go:149	sftp.Open	1	using (0o600 file, 0o700 dir) permissions
2022/08/30 08:07:08 sftp/sftp.go:480	sftp.(*SFTP).Stat	1	Stat(<config/>)
2022/08/30 08:07:08 repository/index.go:404	repository.(*Index).Finalize	1	finalizing index
2022/08/30 08:17:35 restic/cleanup.go:60	main.CleanupHandler	66	signal interrupt received, cleaning up

Where should I go from here?

Thanks,
Dave

I tried regressing back to restic 0.8.3 to match the version that (I believe) created the repository; no change in behavior.

Ruled out transport method by mapping the repository location to a local drive (via SMB); no change in behavior.

Opened issue:

For posterity / future Googlers - the issue was that I was running Restic from Mingw. It was waiting for password input, but Mingw did not display the prompt.

When run from PowerShell, it worked fine!

Thank you to @MichaelEischer for the support on this!

2 Likes