I use the Google auth pam module for 2nd factor on my server.
Twice after an upgrade and reboot my codes have gotten out of sync.

I ran google-authenticator and that fixes the problem, but how can I avoid this in the future.