You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2019/08/31 09:11:40 [WARN] (runner) could not backup "/var/folders/xs/bc89864j0jlb53ty5lz6803m0000gn/T/125157687/724165418": link /var/folders/xs/bc89864j0jlb53ty5lz6803m0000gn/T/125157687/724165418 /var/folders/xs/bc89864j0jlb53ty5lz6803m0000gn/T/125157687/724165418.bak: file exists
Thought this had test coverage, but it didn't. Sorry about that.
I've written a test and am debating the best fix. The most obvious seems to be to just remove the .bak version before doing the link but I'm taking a few to consider my options.
I'm thinking the most robust solution will be to os.Rename .bak to .old.bak, then do the os.Link then, if the link is successful, os.Remove .old.bak. Each step is then atomic and won't break anything if one backup fails and won't lose the backup file if it fails (the .old.bak will hang around until a successful backup is made).
Consul Template version
v0.21.1
Configuration
Debug output
Expected behavior
backup success
Actual behavior
backup failed
Steps to reproduce
References
The text was updated successfully, but these errors were encountered: