Posts: 2,658
Threads: 115
Joined: Oct 2003
I'm using Cosmos and was having some problems after yesterday's update. I had not been allowing the updater to clean the interface addons directory. The solution, as found on the Cosmos forums, was to let the directory be cleaned. They indicated that an AddOn.nopatch file had to be created for each non-Cosmos addon to prevent it from being cleaned. I read it as putting the files in the FrameXML directory. That didn't work. They are to be placed in the first level of the addons directory. Because it didn't work, a couple addons were cleaned out. The two that this caused problems for were QuestHistory and BankItems. There is an automatic flush mechanism that removes data in SavedVariables.lua for any addons not being used. It flushed all my data for the two addons. Because I hadn't realized that had happened, WoW was run another time with the flushed data. The problem with that is that a SavedVariables.lua.old file is created as a backup. The backup was now flushed as well. I lost my quest history and bank items info for all my characters. The bank items will be restored to the addon by simply visiting each account's bank. The quest history is lost. :( That brings up my question.
Does anyone know of a utility/addon that would make and retain multiple backups of SavedVariables.lua? I would like to see something that, at each load or exit of WoW, would create a backup named something like SavedVariables.lua.YYYYMMDDHHMM. An incident such as this would then just require a copy and rename of a backup file to be back to where I was.
BTW, I searched through the WoW forums to see if there was any reference to something like this. I saw references to manually backing it up but not a utility. Posting on that forum is almost pointless with the speed that things scroll off the front pages. I try to visit that place as little as possible anyway. It is the kind of place where you dash in and get your business done and dash back out. :wacko:
Lochnar[ITB]
Freshman Diablo
"I reject your reality and substitute my own."
"You don't know how strong you can be until strong is the only option."
"Think deeply, speak gently, love much, laugh loudly, give freely, be kind."
"Talk, Laugh, Love."
Posts: 2,161
Threads: 100
Joined: Feb 2003
Here's something I cooked up in a few minutes, maybe it can be made better eventually. Just stick this into a batch file (say, "backup.bat"), and run it with "backup.bat ACCOUNTNAME". Note this assumes the standard install directory.
So for me, it would be "backup.bat QUARK" and it would back up SavedVariables.lua.
Code: xcopy "C:\Program Files\World of Warcraft\WTF\Account\%1\SavedVariables.lua" "C:\Program Files\World of Warcraft\WTF\Account\%1\SavedVariablesBackup\" /I /Y
If I see or make anything anything better I'll be sure to post it here.
Trade yourself in for the perfect one. No one needs to know that you feel you've been ruined!
Posts: 2,658
Threads: 115
Joined: Oct 2003
03-20-2005, 12:15 AM
(This post was last modified: 03-20-2005, 12:20 AM by LochnarITB.)
This would only give me one copy of the file. If I didn't notice that information had been flushed it would be easy to write a bad backup too. I played around with your idea some more. I put this in my backup directory as a batch file named svbackup.dat:
Code: @echo off
echo .
echo enter svbackup YYYYMMDDHHMM
echo .
pause
xcopy "C:\timstuff\games\worldofwarcraft\WTF\Account\lochnar\SavedVariables.lua" "C:\timstuff\games\worldofwarcraft\svbackup\" /Y
rename SavedVariables.lua SavedVariables.%1.lua
I then made a command prompt icon that points to that directory. I open the command prompt and type svbackup and the date and it copies and renames a backup of the file. I could actually use any other identifier I wanted as long as I typed the word after the svbackup. The echoes are just a reminder. If I haven't entered an identifier, it doesn't hurt anything. It just creates a file named with an extra period. Not as simple as simply clicking an icon, but it seems to work.
[edit] Forgot to point out that anyone using addons to gather data should be backing up this file. I realized today that I also lost my map notes - npc's, monster farming points, etc. This is the information we create that isn't on the servers like all our character data is.
Lochnar[ITB]
Freshman Diablo
"I reject your reality and substitute my own."
"You don't know how strong you can be until strong is the only option."
"Think deeply, speak gently, love much, laugh loudly, give freely, be kind."
"Talk, Laugh, Love."
Posts: 308
Threads: 23
Joined: Apr 2004
This should do the trick for Win2k, don't know about other versions of windows.
Code: @echo off
for /f "tokens=2-4 delims=/ " %%a in ("%DATE%") do set DATE=%%c-%%a-%%b
for /f "tokens=1-3 delims=:." %%a in ("%TIME%") do set TIME=%%a-%%b-%%c
mkdir "SavedVariables Backups"
copy "SavedVariables.lua" "SavedVariables Backups\SavedVariables__%DATE%_%TIME%.lua"
It references the files relatively, so it's not dependent on your directory structure, but it needs to be run from the directory which contains the SavedVariables.lua file you want to backup. You could of course change that if you want, or make a shortcut to run it from that location more easily.
Note that the date/time format in this code is changed to YYYY-MM-DD_HH-MM-SS.
Less QQ more Pew Pew
Posts: 2,658
Threads: 115
Joined: Oct 2003
Thanks! It works under XP. I was going on my mostly forgotten use of DOS batch files and I couldn't figure out the date business. The parsing you set up did the trick. I modified it to run from the backup directory that already existed and format the date and time differently but now I have a batch file icon that does all the work. One click goodness. :D
Lochnar[ITB]
Freshman Diablo
"I reject your reality and substitute my own."
"You don't know how strong you can be until strong is the only option."
"Think deeply, speak gently, love much, laugh loudly, give freely, be kind."
"Talk, Laugh, Love."
Posts: 356
Threads: 1
Joined: Feb 2003
Just a note that you could save time by adding the command to start WoW to these batch files. Then instead of doing the backup before starting the game, you could just double-click the batch file, and it would automatically backup your SavedVariables and then start the game for you. If you replace your desktop/start menu shortcut for WoW with one for the batch file, you will create a backup each time you start the game.
Posts: 2,658
Threads: 115
Joined: Oct 2003
Xanthix,Mar 20 2005, 07:58 PM Wrote:Just a note that you could save time by adding the command to start WoW to these batch files.
[right][snapback]71350[/snapback][/right] That's a good idea but I don't want a backup every time I start WoW. I'd end up with a full hard drive :( . I tend to jump out a few times a night. I would also have to make it run Cosmos which would then run WoW and I'd hate to introduce one more thing that can go wrong. I can live with one extra click. It's the digging through directories and copying and pasting that I wanted to avoid. It works well now. Thanks for the replies.
Lochnar[ITB]
Freshman Diablo
"I reject your reality and substitute my own."
"You don't know how strong you can be until strong is the only option."
"Think deeply, speak gently, love much, laugh loudly, give freely, be kind."
"Talk, Laugh, Love."
|