Skip to content

First Backup on Windows : "panic: runtime error: invalid memory address or nil pointer dereference" #5391

@issackelly

Description

@issackelly

Output of restic version

(windows host, backup client)
PS C:\Users\Issac Kelly\Projects> restic version
restic 0.18.0 compiled with go1.24.1 on windows/amd64

(via apt-get install restic, backup target host)

[issac@kazad-dum pool]$ restic version
restic 0.16.4 compiled with go1.22.2 on linux/amd64

What backend/service did you use to store the repository?

sftp on linux host on same network

Problem description / Steps to reproduce

I ran the following on the linux host:

[issac@kazad-dum pool]$ restic init --repo /pool/restic-repository/
enter password for new repository:
enter password again:
created restic repository fe5fc0e0f9 at /pool/restic-repository/

And on the windows machine I get the following:

PS C:\Users\Issac Kelly\Projects> restic -r sftp:issac@kaz:/pool/restic-repository backup C:\Users\"Issac Kelly"\ --iexclude-file="C:\Users\Issac Kelly\backup-excludes" --use-windows-vss --verbose 
Kelly\backup-excludes --use-windows-vss --verbose does not exist, skipping
enter password for repository: 
repository fe5fc0e0 opened (version 2, compression level auto)
no parent snapshot found, will read all files
[0:00]          0 index files loaded
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x30 pc=0x10ccb6d]

goroutine 46 [running]:
github.com/restic/restic/internal/archiver.(*Archiver).nodeFromFileInfo(0xc0002340a0, {0xc00010a300, 0x28}, {0xc00010a0f0, 0x28}, {0x23e64cedcf8?, 0xc00048e7e0?}, 0x0?)
        /restic/internal/archiver/archiver.go:268 +0x6d
github.com/restic/restic/internal/archiver.(*Archiver).dirPathToNode(0xc0002340a0, {0xc00010a300, 0x28}, {0xc00010a0f0, 0x28})
        /restic/internal/archiver/archiver.go:745 +0x1d8
github.com/restic/restic/internal/archiver.(*Archiver).saveTree(0xc0002340a0, {0x1f111b0, 0xc0002b02d0}, {0xc00010a300, 0x28}, 0xc000580580, 0x0, 0xc0005805c0)
        /restic/internal/archiver/archiver.go:663 +0x127
github.com/restic/restic/internal/archiver.(*Archiver).saveTree(0xc0002340a0, {0x1f111b0, 0xc0002b02d0}, {0xc000300b30, 0x8}, 0xc0005804c0, 0x0, 0xc000580500)
        /restic/internal/archiver/archiver.go:717 +0x93d
github.com/restic/restic/internal/archiver.(*Archiver).saveTree(0xc0002340a0, {0x1f111b0, 0xc0002b02d0}, {0xc00030095a, 0x2}, 0xc000580440, 0x0, 0xc000580480)
        /restic/internal/archiver/archiver.go:717 +0x93d
github.com/restic/restic/internal/archiver.(*Archiver).saveTree(0xc0002340a0, {0x1f111b0, 0xc0002b02d0}, {0x1ef53f0, 0x1}, 0xc000580140, 0x0, 0xc00032bec0)
        /restic/internal/archiver/archiver.go:717 +0x93d
github.com/restic/restic/internal/archiver.(*Archiver).Snapshot.func1.1()
        /restic/internal/archiver/archiver.go:876 +0x17f
golang.org/x/sync/errgroup.(*Group).Go.func1()
        /home/build/go/pkg/mod/golang.org/x/sync@v0.12.0/errgroup/errgroup.go:78 +0x50
created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 45
        /home/build/go/pkg/mod/golang.org/x/sync@v0.12.0/errgroup/errgroup.go:75 +0x93

Expected behavior

Backs up the client, or describes the issue in my configuration

Actual behavior

stacktrace that I don't yet know how to read

Do you have any idea what may have caused this?

Possibly version mismatch, or PEBCAK because this is my first time operating restic.

Did restic help you today? Did it make you happy in any way?

It's very positively reviewed by my peers and I have every indication that it's going to do the things I need for me and my family!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions