Like many others, I was tired of loosing work from the endless toolset corruptions.
After many attempts at backing up, I came across 7zip and put together a script to automated the backup process.
The result is a windows batch file, which creates a time-stamped 7zip archive file containing all of the module related files.
Now, before making edits ... I can double click the icon to make a new backup, then start editing w/o fear.
None of the old backups are over-written, so recovering from backups is a lot more reliable.
- - - - - - - - - - - - - - - - I've updated the examples, should be easier for people to use.
(less things to change, to get it working)
Here are the "minimal" steps, to get it working ... using the examples files.
1. First install 7zip under "C:\Program Files\7-zip"
2. add 7zip to your PATH
a. Click on START, then CONTROL PANEL .. then double click on SYSTEM icon.
b. goto ADVANCED tab, choose ENVIRONMENT VARIABLES
c. should see (2) lists, one is System Variables ... find the one named "Path"
d. hit edit and then goto the end of the line and add ";C:\Program Files\7-Zip"
e. (to test it) .. START -> RUN "cmd" and type "7z", hit enter.
(should respond with a list of command line options)
3. Create the backup folder
a. open Windows Explorer, select My Computer -> C:
b. create a folder named "backups" under c:\
4. place the "7zbackup.txt" under the "c:\backups" directory
a Edit "7zbackup.txt", changing \LOGIN_NAME\ to match yours.
b. (check under Start -> Control Panel -> User Accounts, if unsure ... lists all the user accounts)
5. place "backup.bat.txt" on your desktop, rename to "backup.bat"
6. Now, double click on the bat file and see if it works.
This will backup all files under the campaign and modules directories ...
(Example) windows batch file to perform the time-stamped backups.
note: had to add .txt on the end, so it would upload properly.
to use it, rename to backup.bat and edit to match your settings.
works fine in Vista ... just install 7zip first and follow the listed setup steps. _________________________ the Red Hand of Doom campaign .. Click Here
@MyHouse
I'm running VISTA x64 ... think the initial problem was getting the path setup.
See all the previous posts - there are directions on setting and testing the PATH. _________________________ the Red Hand of Doom campaign .. Click Here
On my system, it takes about 2-3 minutes for 7zip to compress the 350mb of data into a ~68mb 7zip file. I usually run it, then open the toolset and its a race to see which is done first.
If disk space is an issue, maybe backup the files to a CDR / DVDR ... and delete them off the HD.
But I would recommend at least (2 weeks) of backups.
_________________________ the Red Hand of Doom campaign .. Click Here
Posted by Venture at 2007-05-05 07:04:31 Voted 9.00 on 05/05/07
I just modified the 7zbackup.txt file so that it only backs up the directory I'm working in (I usually work in directory mode). It still takes a real long time to back it up (maybe I'm doing something wrong, but it has been running for several minutes). For a situation where disc space is not an issue, a nice variation on this tool would be one that does what this does, but without the 7zip compression (as that seems to be what takes a long time). In other words, takes your current module directory, renames it, and moves it to a specified backup directory. Once past the configuration hurdles, this is a very nice tool, though, and I plan to run it at the end of building sessions. _________________________ NWN Campaigns - the NWN/NWN2 Campaign Database Naeldor Weekly Campaign
Posted by Venture at 2007-05-05 06:56:03 Voted 9.00 on 05/05/07
Bad explanation on my part - I got 7zip running, but the backup script wasn't doing anything. I've since gone in and reconfigured everything to get my backup directory to match yours as close as possible (to make changing the bat file easier) and now it works. Great tool. Thanks for it. By the way, a word to other programming noobs like me- I think they way I configured the script, it is backing up a directory in which I have a whole bunch of mods (so the backup is taking a long time, and backing up more than I need if I understand it correctly). I need to reconfigure it just to back up the directory of the module I am currently working on. _________________________ NWN Campaigns - the NWN/NWN2 Campaign Database Naeldor Weekly Campaign
to test if 7Zip is installed and in the PATH properly ...
1. click START -> RUN
2. type "cmd", hit ENTER
3. type "7z", hit ENTER
... should return a list of command line options for 7zip.
otherwise, make sure its installed ... and the PATH points to its install location. _________________________ the Red Hand of Doom campaign .. Click Here
Posted by Venture at 2007-05-03 18:47:57 Voted 9.00 on 05/05/07
I ran it, nothing happened, and I got the blue screen of death. I'm assuming I need to change the last line of the bat file. If my backup directory is located at N:/NWN2/Mod backups, would I need it to read like this:
7z a N:/NWN2/Mod backups/%_file%-%_yy%-%_mm%-%_dd%@%_hr%-%_min%%_ext% @E:/NWN2/Mod backups/7zbackup.txt
Thanks for any help. This looks promising, but it is a bit complicated for the average user to set up. _________________________ NWN Campaigns - the NWN/NWN2 Campaign Database Naeldor Weekly Campaign
note: It will likely be "C:\Program Files\7-zip" for most users. Same goes for the examples files, be sure to edit them to match your systems settings. _________________________ the Red Hand of Doom campaign .. Click Here
Posted by Venture at 2007-05-03 04:37:07 Voted 9.00 on 05/05/07
That worked, thanks! I'll test out the rest of this tonight. _________________________ NWN Campaigns - the NWN/NWN2 Campaign Database Naeldor Weekly Campaign
the end result, is a "backups" directory ... which will contain time-stamped backups of your files.
the backup process itself can take a few minutes, based upon the file sizes and your PCs speed. _________________________ the Red Hand of Doom campaign .. Click Here
Click on START, then CONTROL PANEL .. then double click on SYSTEM icon.
then goto ADVANCED tab, choose ENVIRONMENT VARIABLES
should see (2) lists, one is System Variables ... find the one named "Path"
hit edit and then goto the end of the line and add ";D:\Program Files\7-Zip"
this is what mine looks like "%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;D:\Program Files\7-Zip".
This should work for everyone using windows XP ... _________________________ the Red Hand of Doom campaign .. Click Here
Posted by Venture at 2007-05-02 17:33:52 Voted 9.00 on 05/05/07
For the less tech-savvy, can you explain how/what you mean by "add your install directory to your Windows path." I've tried to do this with some instructions found in a google search, but can't get things to work. Thanks. _________________________ NWN Campaigns - the NWN/NWN2 Campaign Database Naeldor Weekly Campaign
I don't know if people have suggested this before, but if I get an error message, I export everything in an erf and then import it all back into a new mod. It doesn't save factions, so this sounds like a good idea to save time on that :) If i understand right, and this backs up your mod before editing, exporting to an erf your latest work and then importing into the backup made with this tool would mean you won't lose anything at all :D
You must be Logged In to post comments in this section.
10 - A Masterpiece, Genuinely Groundbreaking 9 - Outstanding, a Must Have 8 - Excellent, Recommended to Anyone 7 - Very Good, Deserves a Look 6 - Good, Qualified Recommendation 5 - Fair, Solid yet Unremarkable 4 - Some Merit, Requires Improvements 3 - Poor Execution, Potential Unrealized 2 - Very Little Appeal 1 - Not Recommended to Anyone