Cron mails spurious output

I have an hourly cronjob backup of a few files. Almost always, the files haven’t changed. Cron is mailing this when the files haven’t changed :

EOF
ReadFull 
main.readPassword
    src/github.com/restic/restic/cmd/restic/global.go:251
main.ReadPassword
    src/github.com/restic/restic/cmd/restic/global.go:287
main.OpenRepository
    src/github.com/restic/restic/cmd/restic/global.go:339
main.runBackup
    src/github.com/restic/restic/cmd/restic/cmd_backup.go:391
main.glob..func2
    src/github.com/restic/restic/cmd/restic/cmd_backup.go:49
github.com/restic/restic/vendor/github.com/spf13/cobra.(*Command).execute
    src/github.com/restic/restic/vendor/github.com/spf13/cobra/command.go:698
github.com/restic/restic/vendor/github.com/spf13/cobra.(*Command).ExecuteC
    src/github.com/restic/restic/vendor/github.com/spf13/cobra/command.go:783
github.com/restic/restic/vendor/github.com/spf13/cobra.(*Command).Execute
    src/github.com/restic/restic/vendor/github.com/spf13/cobra/command.go:736
main.main
    src/github.com/restic/restic/cmd/restic/main.go:69
runtime.main
    /usr/lib/go-1.8/src/runtime/proc.go:185
runtime.goexit
    /usr/lib/go-1.8/src/runtime/asm_amd64.s:2197
unable to read password
main.ReadPassword
    src/github.com/restic/restic/cmd/restic/global.go:291
main.OpenRepository
    src/github.com/restic/restic/cmd/restic/global.go:339
main.runBackup
    src/github.com/restic/restic/cmd/restic/cmd_backup.go:391
main.glob..func2
    src/github.com/restic/restic/cmd/restic/cmd_backup.go:49
github.com/restic/restic/vendor/github.com/spf13/cobra.(*Command).execute
    src/github.com/restic/restic/vendor/github.com/spf13/cobra/command.go:698

github.com/restic/restic/vendor/github.com/spf13/cobra.(*Command).ExecuteC
src/github.com/restic/restic/vendor/github.com/spf13/cobra/command.go:783
github.com/restic/restic/vendor/github.com/spf13/cobra.(*Command).Execute
src/github.com/restic/restic/vendor/github.com/spf13/cobra/command.go:736
main.main
src/github.com/restic/restic/cmd/restic/main.go:69
runtime.main
/usr/lib/go-1.8/src/runtime/proc.go:185
runtime.goexit
/usr/lib/go-1.8/src/runtime/asm_amd64.s:2197

Oddly, I don’t get this output if I run a manual backup when nothing has changed. How can I prevent this output? Is there the equivalent of a -q quiet switch?

Newbie to restic, congrats to devs – I like the design.
Many thanks.

OP here. Nevermind, I was reading the trace wrong (for fellow newbs: it’s decreasing relevance, the opposite to python). Looks like the cronjob isn’t getting the password.

PS How do you delete a post?

Interesting. I guess the answer lies in how that cron is run and how you are giving the password to restic. Can you elaborate, perhaps show the relevant scripts/command lines?

You might be able to delete a post within five minutes or so, I’m not sure. If you can, it should be by clicking on the … icon at the bottom of your post, and then the trash can icon.

You can delete the post yourself, there’s a small menu icon below the post. If you really like you can delete the post, or leave it up for people who have the same problem so they can discover it via the search function :slight_smile:

Silly error. In the crontab entry, I set the repository environment variable and forgot to also set the password variable. D’oh. (It worked ok in my shell when I was testing because I had those environment variables already set.)

1 Like