Reporting of new and changed files seems wrong

Hi all,

I’m a new user, so I’m reluctant to open an issue on Github because it’s likely I’m just doing it wrong.
I’m running restic in a docker container on a RancherOS server. I’ve already created a backup of some of my files to a repo on Wasabi. This works fine. However, I’m getting some weird reports while running subsequent back-ups, so I’m wondering if something’s wrong.

Running the following command:

docker run --rm -it \
    -e "AWS_ACCESS_KEY_ID=<hidden>" \
    -e "AWS_SECRET_ACCESS_KEY=<hidden>" \
    -e "RESTIC_REPOSITORY=s3:s3.wasabisys.com/<hidden>" \
    -v "restic-config:/restic-config" \
    restic/restic:latest \
    -p /restic-config/passfile \
    snapshots

Shows an output like this:

repository 679aaf20 opened successfully, password is correct
ID        Date                 Host          Tags        Directory
----------------------------------------------------------------------
725902b8  2018-09-25 11:33:52  a13910f94241              <hidden dir>
b968b3a4  2018-09-25 13:43:13  b5a425de3233              <hidden dir>
c4f5bf49  2018-09-25 13:56:53  2647ced915e1              <hidden dir>
01a1eabf  2018-09-26 05:21:58  4d0f5ea30162              <hidden dir>
----------------------------------------------------------------------
4 snapshots

Which is expected.

However, when I run this command:

docker run --rm -it \
        -e "AWS_ACCESS_KEY_ID=<hidden>" \
        -e "AWS_SECRET_ACCESS_KEY=<hidden>" \
        -e "RESTIC_REPOSITORY=s3:s3.wasabisys.com/<hidden>" \
        -v "restic-config:/restic-config" \
        -v"/mnt/storage/:/mnt/storage/" \
        restic/restic:latest \
        -p /restic-config/passfile \
        backup \
        --files-from /restic-config/storage-files

I get this kind of output:

repository 679aaf20 opened successfully, password is correct

Files:         781 new,     0 changed,     0 unmodified
Dirs:            3 new,     0 changed,     0 unmodified
Added to the repo: 351 B

processed 781 files, 13.370 GiB in 3:29
snapshot 01a1eabf saved

As you can see, the files are not duplicated (only 351 B added to repo), but it shows them all as being new, rather than being unchanged (which they are). Am I doing something wrong?

Thanks,
Marten

Hi, welcome to the forum!

It looks like restic does not find a previous snapshot of exactly the same files you’re saving, probably because the host name changes for every run. You can pass the host name restic should use by passing it via --hostname so it will be the same for every run. Then run restic again, and again, and then it should print something like “using parent snapshot” so you know it found one.

It is also a good idea to retain the cache directory (usually ~/.cache/restic) between the runs so restic can be much faster… :slight_smile: