[Tinymux] Win32 database backup procedure?
Stephen Dennis
brazilofmux at gmail.com
Fri May 5 10:58:33 EDT 2006
If you don't want to @shutdown the game, you have a few options:
The way the database is designed, you can COPY or XCOPY the ./game
directory to somewhere else, and then use either 'db_unload netmux
netmux.db.new netmux.flat' or dbconvert directly to create a flatfile.
This above method does 'work', but there are some caveats. It is safe
for the game, however it may not capture every change made in game
particularly a change where a new attribute name is created.
Typically, any bboard posts made since the last @dump will be blanked
out and if that backup is used later, those posts would need to be
manually removed. This does not represent accumulated corruption
though.
If you have softcoded some kind of bank which attempts to performed
atomic 'transfers', it is possible with the above method that the
money can appear in both accounts. Again, not the end of the world for
a game, and this does not represent some kind of accumulated database
corruption.
Another method that minimizes the above drawbacks is to @dump from
within the game just before COPYing the files.
Another method is to use @dump/flat from within the game. The flatfile
produced from that is exact. Perhaps have @dump/flat on a @daily, and
the backup script just comes along and grabs whatever flatfile that
has been produced.
@backup isn't implemented on Win32, so that's not an option.
If you are willing to @shutdown the game, use dbconvert or or
db_unload as described above without the above risks.
db_unload and db_load as you might have gathered by now are .bat files
which invoke dbconvert in mux2.4/game/bin.
The important files to backup in data are: comsys.db, mail.db,
netmux.pag, netmux.dir, and netmux.db.new. If you create a flatfile
(which I recommend) from netmux.pag, netmux.dir and netmux.db.new,
then the files to backup are comsys.db, mail.db, and netmux.flat
Usually, you would want to backup your netmux.conf and also your
staffhelp.txt, plushelp.txt, news.txt, any any other text file you
changed that wasn't in the original distribution. It isn't necessary
or desireable to backup help.txt and wizhelp.txt for example.
Brazil
On 5/4/06, Joseph Greenawalt <jsgreenawalt at gmail.com> wrote:
> Hello. I'm attempting to write a small script to perform automatic backups
> of the tinyMUX 2.4 database(s). I want to make sure that the script is
> safe, does not corrupt the database, and backups are reliable. With these
> goals in mind I have a couple of questions.
>
> 1. Is it necessary to put the database files into a "safe" state so that
> they can be copied? If so, what is the best way to go about doing this? Is
> it possible to "safe" the db(s) without restarting the process? If not, how
> can the netmux process be shutdown and restarted gracefully from an external
> script?
> 2. What is the purpose of the db_unload.bat and db_load.bat script files?
> 3. Which files in the data folder need to be backed up in order to
> successfully recover from catastrophic data loss (I'm assuming all of them)?
>
> Any pointers or information to get me headed in the right direction will be
> greatly appreciated.
>
> - Joe Greenawalt
> tinyMUX newb
>
> _______________________________________________
> Tinymux mailing list
> Tinymux at tinymux.org
> http://www.tinymux.org/mailman/listinfo/tinymux
>
>
>
More information about the Tinymux
mailing list