WoW addon settings backup and restoring from backup
I'm having the most awesome day today. Not only did I lose just about all of my addon settings (including multiple hours of work setting up WeakAuras with custom triggers), but I also figured out I happened to buy the most buggy SSD available on the market...
Anyway, due to the loss of addon settings I was trying to see if it was possible to restore the settings and it seems there is a way (provided you don't do what I did). Just thought I'd share with you guys, should your computer crash and corrupt your addon settings.
WoW stores addon settings in:
WTF\Account\[Account name]\SavedVariables
WTF\Account\[Account name]\[Server name]\[Character name]\SavedVariables
The former is the most interesting, as this is where most addons put their settings (so they are available to all your characters on all realms). Profiles and such.
The files in those folders are named by the addon and have the file extension .lua. The backup files have the extension .lua.bak, for example:
Skada.lua
Skada.lua.bak
I'm not 100% about the following, but it seems to be how it works:
- When WoW shuts down there is an exit handler that copies the content from the .lua files to the corresponding .lua.bak files and stores whatever changes you made ingame in their respective .lua files.
- If your WoW crashes in a way that interrupts this handler and corrupts the data (PC crashes for instance) only the .bak files are intact.
- Following a crash it seems like WoW actually reads the settings from the .bak files, but then overwrites them with new empty settings files as soon as you shut down WoW following a crash.
- On the subsequent launch (which is now the second launch of WoW following the crash) the empty settings files are loaded.
At this point I believe you still have the possibility to restore your addon settings, if you immediately copy your WTF folder WITHOUT SHUTTING DOWN WoW! After that you can shut down WoW and do a lot of tedious file renaming from .lua.bak to .lua (something like Fast File Renamer might be able to do the job), but at least you will still have your addon settings.
Obviously I didn't keep WoW open (since I didn't know how WoW does backup of addon settings). Time to set up my UI again...