Or, "How not to completely dissolve in a pile of tears and rage the moment an addon crashes and takes your entire UI with it".
Technical Know-How Required: **---
Technical Know-How it Sounds Like it Should Require:*****
(TL;DR: It sounds more complicated than it really is.)
This is a simplistic method for addon backup that I figured I'd share with you all. It was born from a string of unfortunate UI crashes (and subsequent swearing sessions) on my boyfriend's machine, and I figured there has to be a way to prevent that, or at least, easily recover from it.
Most of us don't consider backing up our addons until it's too late, which is truly unfortunate, as crashes tend to occur only after we've spent hours painstakingly rearranging our UI. It takes about 10 minutes of (figurative) elbow grease to set up, but saves you countless hours of agony should you experience a complete UI meltdown.
The point of this is to create a "last known good" backup of your addons in their existing, working state. Therefore, you want to use it when everything is working perfectly.
Use this when:
1) You are about to install a new addon
2) You are about to update an existing addon
3) You have just spent a long time tweaking your UI and it's perfect right now
Don't use this when:
1) You have just installed a new addon and have not yet launched WoW
2) After updating an existing addon if you have not yet launched WoW
3) Patch day has just hit and you're not sure yet if every addon feels like cooperating
How do I do it?
We will make use of a handy little tool called xcopy, and create a batch file.
wtf is xcopy?
By definition, xcopy "copies files and directory trees". It's a command line application (built directly into Windows) which makes it perfect for regular backups. You won't actually need to use the command prompt while making this, but it will run in a command prompt (aka DOS) window when you run it. We're gonna learn how to create a batch file!
wtf is a batch file?
A batch file is basically a series of commands that's executed in a command prompt (DOS) window--kind of like a macro for your OS. It's a really old way of doing things, but it's very efficient, and simple to learn.
OK, now that I know all that technical junk, what do I do next?
1) Determine where you want to save your backup copies. We will be copying your Interface and WTF folders, as these are what's responsible for holding your addons and their configurations. Personally, I chose an entirely different partition for my backups than where WoW is installed. I'd recommend this setup if your computer is set up with multiple partitions and/or physical drives, as it provides an additional layer of protection in case the entire drive or partition goes bad.
2) Once you know where you want to put them, create new folders in that location with the name of your choosing. (I chose to keep the names Interface and WTF so that in case a restore is needed, I can easily identify which folder should go where.)
3) Open up Notepad. This is where you're going to actually write your batch file. Here's what mine looks like:
In my case, because I wanted it on a different drive, I had to use the cd (change directory) command to get it to write to the correct location. If you have just 1 drive, you can simply type:
cd /d S:\WTF
xcopy "P:\Program Files\World of Warcraft\WTF" /e /y
xcopy "P:\Program Files\World of Warcraft\Interface" /e /y
xcopy (source folder--WoW's Interface or WTF folder) (destination folder--the one you created in step 2) /e /y
The /e and /y are called "parameters", and these particular two parameters do the following:
/e: copies directories and subdirectories, including empty ones (this means all your subfolders will be preserved, which is really important)
/y: suppresses prompting to confirm you want to overwrite an existing destination file. This parameter is here for the subsequent uses of this batch file, as having to be prompted to overwrite every time gets kind of old after a while.
Don't forget to have two lines of xcopy: one for Interface and one for WTF. Note that if your source or destination locations contain spaces anywhere in them, you should use quotes for the entire location.
xcopy "C:\Program Files\World of Warcraft\Interface" "C:\Documents and Settings\username\My Documents\Interface" /e /y
xcopy "C:\Program Files\World of Warcraft\WTF" "C:\Documents and Settings\username\My Documents\WTF" /e /y
OK, I have this all in Notepad, but it's not a batch file. How do I make it a batch file?
cd /d "K:\WoW Backups\WTF"
xcopy "C:\Program Files\World of Warcraft\WTF" /e /y
cd "K:\WoW Backups\Interface"
xcopy "C:\Program Files\World of Warcraft\Interface" /e /y
The difference between a regular Notepad file and a fancy batch file is all in how you save it. When you've got your code, go to File>Save As. Navigate to where you want to save it (I choose the desktop, personally, because I am lazy), and at the bottom where it says "Save as Type" choose All Files. Then, at the end of your filename, type .bat and save it.
This may have read a little awkwardly, so here's a picture explaining what I mean:
If you did it correctly, the icon should look different than the icons you're used to seeing. You should see an icon that looks like this:
Yay, I created it!...now how do I actually use it?
This is the easy part. Whenever you want to run it, simply double-click on the file. It will open a command prompt window, you'll see lines of text flying by at Ludicrous Speed, and it will close itself. That's it!
OMG my UI crashed, burned and died in a horrific heap of malformed code Now what?
The batch file only created the backups; you have to restore them manually. This is super simple: copy the files from the backed-up location, and simply paste them into your WoW folder. They should overwrite the existing Interface and WTF folders; this is fine.
If you named your backup folders something different, you would have to rename or delete the original Interface and WTF folders, then rename your backup folders to Interface and WTF, respectively, once you've pasted them into your WoW folder. Launch WoW, and everything should be as it was before something went horribly wrong.
Please note that this restoration does revert addons to the versions they were running at the last time you ran a backup. This can be really helpful if an addon update was what caused the conflict, but because of this, please be sure to use your batch file regularly. It doesn't do you any good to revert to a version of an addon that's 5 releases old.
I hope this information was helpful!