resticcheck reports packs that aren’t referenced in any index, is my repository broken?¶

When resticcheck reports that there are pack files in the
repository that are not referenced in any index, that’s (in contrast to
what restic reports at the moment) not a source for concern. The output
looks like this:

The message means that there is more data stored in the repo than
strictly necessary. With high probability this is duplicate data. In
order to clean it up, the command resticprune can be used. The
cause of this bug is not yet known.

When you run resticbackup, you need to enter the passphrase on
the console. This is not very convenient for automated backups, so you
can also provide the password through the --password-file option, or one of
the environment variables RESTIC_PASSWORD or RESTIC_PASSWORD_FILE
environment variables. A discussion is in progress over implementing unattended
backups happens in #533.

Important

Be careful how you set the environment; using the env
command, a system() call or using inline shell
scripts (e.g. RESTIC_PASSWORD=password restic ...)
might expose the credentials in the process list
directly and they will be readable to all users on a
system. Using export in a shell script file should be
safe, however, as the environment of a process is
accessible only to that user. Please make sure that
the permissions on the files where the password is
eventually stored are safe (e.g. 0600 and owned by
root).