Just a warning: S3 and system time

I just noticed that a VM wasn’t backed up by my restic cronjobs the last days. I did a “restic snapshots” and got the follwoing error

Fatal: unable to open config file: Stat: The difference between the request time and the current time is too large.
Is there a repository at the following location?

I noticed that the system time of the machine was about 30 minutes late. I will check later why exactly this was the case. I just wanted to leave this warning here - incorrect system time can lead to automated backups not beeing done - at least with S3 backend.

1 Like

I believe this is due to S3 request signing. All requests to S3 have to be signed using the IAM user’s secret access key, and the current timestamp is part of that. The signature is only valid within a certain window of time around the timestamp in the signature. The server is rejecting the signature because the timestamp is outside of this window, too far in the future.