Author |
Message |
SteveH_66
Ensign
Joined: Wed Nov 06, 2002 3:00 am Posts: 268
|
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.
|
Wed Sep 23, 2015 2:09 pm |
|
|
Vid Kid
Commander
Joined: Sun Feb 25, 2001 3:00 am Posts: 1837 Location: Guam USA
|
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
_________________ TWGS V2 Vids World on Guam Port 2002 Telnet://vkworld.ddns.net:2002 Discord @ DiverDave#8374 Vid's World Discord
Founding Member -=[Team Kraaken]=- Ka Pla
Winners of Gridwars 2010 MBN Fall Tournament 2011 winners Team Kraaken Undisputed Champions of 2019 HHT Just for showing up!
The Oldist , Longist Running , Orginal Registered Owner of a TWGS server : Vids World On Guam
|
Wed Sep 23, 2015 7:47 pm |
|
|
CBYNot
Chief Warrant Officer
Joined: Sat Jul 14, 2012 6:32 pm Posts: 104
|
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..
_________________ "TW: A proud tradition of...change is the only constant."
-Val
|
Wed Sep 23, 2015 9:29 pm |
|
|
SteveH_66
Ensign
Joined: Wed Nov 06, 2002 3:00 am Posts: 268
|
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
|
Thu Sep 24, 2015 8:49 am |
|
|
Micro
Ambassador
Joined: Wed Apr 20, 2011 1:19 pm Posts: 2559 Location: Oklahoma City, OK 73170 US
|
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.
_________________ Regards, Micro Website: http://www.microblaster.net TWGS2.20b/TW3.34: telnet://twgs.microblaster.net:2002
ICQ is Dead Jim! Join us on Discord: https://discord.gg/zvEbArscMN
|
Thu Sep 24, 2015 2:28 pm |
|
|
SteveH_66
Ensign
Joined: Wed Nov 06, 2002 3:00 am Posts: 268
|
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.
|
Thu Sep 24, 2015 3:08 pm |
|
|
Micro
Ambassador
Joined: Wed Apr 20, 2011 1:19 pm Posts: 2559 Location: Oklahoma City, OK 73170 US
|
Re: Possible to have TWX script make a backup of TWX Databas
This should help: http://www.sevenforums.com/tutorials/12 ... -task.htmlJust select your batch file instead of an executable.
_________________ Regards, Micro Website: http://www.microblaster.net TWGS2.20b/TW3.34: telnet://twgs.microblaster.net:2002
ICQ is Dead Jim! Join us on Discord: https://discord.gg/zvEbArscMN
|
Thu Sep 24, 2015 6:04 pm |
|
|
SteveH_66
Ensign
Joined: Wed Nov 06, 2002 3:00 am Posts: 268
|
Re: Possible to have TWX script make a backup of TWX Databas
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.
|
Fri Sep 25, 2015 2:46 pm |
|
|
T0yman
Veteran Op
Joined: Sat Dec 29, 2007 5:06 pm Posts: 2059 Location: Oklahoma
|
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.
_________________ T0yman (Permanently Retired since 2012) Proverbs 17:28 <-- Don't know it, most should it would stop a lot of the discussions on here.
|
Fri Sep 25, 2015 8:50 pm |
|
|
Star Killer
Commander
Joined: Wed May 01, 2013 11:28 pm Posts: 1318 Location: Rural Indiana
|
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
_________________ Star Killer USA(RETIRED) Loyalty Above All Else Except Honor Playing with integrity is more important than winning HHT 2015 Champs: Cloud09 2015 Lottery Tournament Winning Team Member 2016 Big Game Draft Tournament Winning Team Member HHT 2016 Champs: Cloud09 HHT 2021 Champs(Just For Showing Up) HHT 2022 Champs(For 90mins of Play) Star Killer's Ice9 TWGS Viper's Pit V1 TWGS Website: http://sk-twgs.com Email: starkillerstwgs@yahoo.com Discord: Star Killer#0358 Ice 9 V2 TWGS: SK-TWGS.COM PORT 2002 Viper's Pit V1 TWGS: V1.SK-TWGS.COM PORT 2002 Now The Fastest TWGS in the West https://www.facebook.com/StarKillersTradeWars/ To help offset the server(s) hosting bill donate via PayPal to: starkillerstwgs@yahoo.com
|
Sun Oct 25, 2015 8:46 pm |
|
|
|