Restic CLI change stopped backups and the importance of checking your backups regularly

I’m going to start by saying this is not a problem with restic, it’s that I was using restic incorrectly, plus I wasn’t monitoring my backup script output or checking the backup repository. It’s really just a heads up for others.

I discovered today that backups for a couple of my servers haven’t run successfully for about two months. Around that time I likely upgraded to Restic 0.15, which I suspect parses the command line slightly differently from the previous versions of Restic.

Previously this command worked fine.

restic --repo --no-scan backup /var/www

With v0.15 when you run that you get the error ‘unknown command “/var/www” for “restic”’. When you put the “backup” command at the start of the line, or even just before the “–no-scan” it works fine.

restic backup --repo --no-scan /var/www

The docs say to do it the second way, so it’s a PEBKAC error, but I wonder if anyone else was caught out by this. Because it’s a CLI tool and I don’t monitor the output of the script, any failures are silent.

I do restore tests every six months, but I should probably do them more regularly - even though these personal servers aren’t critical.


Hey, thanks for the heads up! We’re trying to keep the command line as compatible as possible when doing releases, so what happened to you should not happen…

I doubt that this command line worked before. The --no-scan option is specific to the backup command and was only introduced in the 0.15.0 release.

Is it maybe possible that somebody saw that in the release changelog and added the option at the wrong place? :slight_smile: I’m only suggesting this hypothesis because a) it’s likely and b) it totally could have happened to me :stuck_out_tongue:


That’ll be it! I probably half read the documentation and added “no-scan” after the 0.15.0 release without testing it properly.

It’s still a good reminder to test your backups :slight_smile: