| www.ClassicTW.com http://classictw.com/ |
|
| Possible to have TWX script make a backup of TWX Database? http://classictw.com/viewtopic.php?f=15&t=34703 |
Page 1 of 1 |
| Author: | SteveH_66 [ Wed Sep 23, 2015 2:09 pm ] |
| Post subject: | Possible to have TWX script make a backup of TWX Database? |
Is it possible to write a script that would make a backup copy of the TWX database file? I don't see a command in the script reference that looks like it would work, so I don't really think it's possible. Was just hoping I could do it, since I think I keep corrupting my database sometimes when writing a script and it locks up and crashes TWX. |
|
| Author: | Vid Kid [ Wed Sep 23, 2015 7:47 pm ] |
| Post subject: | Re: Possible to have TWX script make a backup of TWX Databas |
TWX does not have a copy command. So if you wanted to copy it you would have to do it manually. You can not corrupt a database by using a script , unless you have it go from one game to another. That would take me awhile to figure out a way to do that. So unless you are using the same twx proxy database to go into more then one game , you do not really have corrupt data (as being reported). Its just something some of the versions of twx report. There are work a rounds to fix that. Most are just a pain in the butt. The main one would be by trying to create a database by a recently deleted name. So its best to just vary the name each time if possible. Hope this helps. Vid |
|
| Author: | CBYNot [ Wed Sep 23, 2015 9:29 pm ] |
| Post subject: | Re: Possible to have TWX script make a backup of TWX Databas |
SteveH_66 wrote: Is it possible to write a script that would make a backup copy of the TWX database file? I don't see a command in the script reference that looks like it would work, so I don't really think it's possible. Was just hoping I could do it, since I think I keep corrupting my database sometimes when writing a script and it locks up and crashes TWX. Could just go into \TWXProxy\data, find the .xdb file you want to backup, and copy and paste it into another directory. Then if your DB gets corrupted, exit TWXProxy and delete the .xdb in \TWXProxy\data, and copy and paste in the backup with same name, that you saved somewhere else.. |
|
| Author: | SteveH_66 [ Thu Sep 24, 2015 8:49 am ] |
| Post subject: | Re: Possible to have TWX script make a backup of TWX Databas |
Thanks for the information Vid. And thanks for the reply CBY, was just looking for a way to automate the process, I am forgetful by nature |
|
| Author: | Micro [ Thu Sep 24, 2015 2:28 pm ] |
| Post subject: | Re: Possible to have TWX script make a backup of TWX Databas |
SteveH_66 wrote: Thanks for the information Vid. And thanks for the reply CBY, was just looking for a way to automate the process, I am forgetful by nature use a dos batch file: rd c:\tw2002\twxproxy\data\backup_old /s /q rename c:\tw2002\twxproxy\data\backup backup_old xcopy c:\tw2002\twxproxy\data c:\tw2002\twxproxy\data\backup You could even use windows scheduler to run this daily, weekly, etc. You could also use windows shadow copies to take snapshots of your HD. |
|
| Author: | SteveH_66 [ Thu Sep 24, 2015 3:08 pm ] |
| Post subject: | Re: Possible to have TWX script make a backup of TWX Databas |
Micro wrote: SteveH_66 wrote: Thanks for the information Vid. And thanks for the reply CBY, was just looking for a way to automate the process, I am forgetful by nature use a dos batch file: rd c:\tw2002\twxproxy\data\backup_old /s /q rename c:\tw2002\twxproxy\data\backup backup_old xcopy c:\tw2002\twxproxy\data c:\tw2002\twxproxy\data\backup You could even use windows scheduler to run this daily, weekly, etc. You could also use windows shadow copies to take snapshots of your HD. Thanks Micro, I was thinking yesterday about using a batch file to do it, and was even looking up a few things. It's been since my DOS 6.~ days and Windows 3.1 since I did it, but I had a little collection of them back then. Forgot most of the stuff about how to do it, but it looks like your code would work great with some modifications for my directory structure. Yesterday I was trying to see how to set up the new task in Task Scheduler (I'm using Windows 7 Home Premium) and I found out a couple of things. Something has really hosed my scheduled tasks, I got about 30 messages about the task couldn't run because it was corrupted or tampered with. Don't know what that was all about, and couldn't find a way to delete the corrupted tasks - I don't mess with Task Scheduler much. The other thing was, I couldn't see how to set up a new task to run a file, maybe I need to take another look at it again. Probably just missed it somehow. Appreciate the help and info. |
|
| Author: | Micro [ Thu Sep 24, 2015 6:04 pm ] |
| Post subject: | Re: Possible to have TWX script make a backup of TWX Databas |
This should help: http://www.sevenforums.com/tutorials/12 ... -task.html Just select your batch file instead of an executable. |
|
| Author: | SteveH_66 [ Fri Sep 25, 2015 2:46 pm ] |
| Post subject: | Re: Possible to have TWX script make a backup of TWX Databas |
Micro wrote: This should help: http://www.sevenforums.com/tutorials/12 ... -task.html Just select your batch file instead of an executable. Thanks Micro, I will check out that tutorial, seven forums has some good stuff. I had already looked at task scheduler again, and I think I saw executable or program or something as a choice now that you mention it. |
|
| Author: | T0yman [ Fri Sep 25, 2015 8:50 pm ] |
| Post subject: | Re: Possible to have TWX script make a backup of TWX Databas |
I used to shutdown the server from 0005 to 0015 and while offline run a backup and turn the server back on. Never had a corrupt database but like Micro said make it call a batch file. I might still have mine I would have to look on that TWGS computer tomorrow and see if is still there. |
|
| Author: | Star Killer [ Sun Oct 25, 2015 8:46 pm ] |
| Post subject: | Re: Possible to have TWX script make a backup of TWX Databas |
T0yman wrote: I used to shutdown the server from 0005 to 0015 and while offline run a backup and turn the server back on. Never had a corrupt database but like Micro said make it call a batch file. I might still have mine I would have to look on that TWGS computer tomorrow and see if is still there. yeah i'd like a copy of that too. I havn't used dos in 15+ years and forgot how to write one lol sk |
|
| Page 1 of 1 | All times are UTC - 5 hours |
| Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |
|