A family member wanted to create a new TinyMUSH using an existing one as a starting point. She felt it would be easier to modify the existing one than to start a new one from scratch. I took the steps detailed below to copy the existing MoonDreaming MUSH to a new one that she wanted to set up for SailorMoon roleplaying.
I shut down the original MUSH
using the @shutdown
command
while logged into the MUSH as god. I then ran ./Backup
from
the command line.
$ ./Backup
Creating flatfile ./backups/moondreaming.1007-1558
Loaded module: comsys
Loaded module: mail
Using gdbm file: ./data/moondreaming.gdbm
Reading ........
Input: TinyMUSH-3 version 1: Zone Link GDBM AtrName AtrKey Parent AtrMoney ExtFlags MoreFlags Powers QuotedStr TypedQuotas Timestamps VisualAttrs
Output: TinyMUSH-3 version 1: Zone Link Parent ExtFlags MoreFlags Powers QuotedStr TypedQuotas Timestamps VisualAttrs
Writing ........
Cleaned 1600 attributes (now 1376): 222 deleted, 186 renumbered (96 objects and 463 individual attrs touched).
Creating database archive ./backups/moondreaming.1007-1558.tar.gz
./backups/moondreaming.1007-1558
./data/mod_comsys.db
./data/mod_mail.db
I changed the working directory to the one containing the existing MUSH directory and then copied that directory and its subdirectories recursively.
$ cp -p -r moondreaming sailormoon
I then made the current working directory the one for the new MUSH.
$ cd sailormoon
I then edited mush.config in that directory. I changed the GAMENAME line to match the name of the new MUSH. I left the OWNER line the same, since the owner was the same person in this case.
GAMENAME=sailormoon
I then renamed the old conf file to match the new MUSH name and deleted the log and pid files from the other MUSH. The pid file contains the process id for the other MUSH process. A new one will be assigned the first time the new MUSH is run. If the pid file is not deleted, when you run Startmush it will state that the MUSH is already running.
$ mv moondreaming.conf sailormoon.conf
$ rm moondreaming.log*
$ rm moondreaming.pid
I also deleted the db directories that came from the other MUSH's directory.
$ rm -f -r db-*
I edited the new sailormoon.conf file I renamed to set the port for the new MUSH and its new name, changing the lines below within it.
crash_database moondreaming.db.CRASH
gdbm_database moondreaming.gdbm
port 7676
mud_name MoonDreamingMUSH
The new MUSH must listen on a different port than the existing MUSH and
one that is not in use by any other application. You can use
netstat -a | grep 9999
substituting the port number you've
picked instead of 9999
to see whether an application is
listening on that port. If no other process is listening on that port, at
least at the time you run the command, you see the command prompt returned, but
nothing else. Only the root account can use a port less than 1024; ports below
that number are considered to be "reserved".
I changed the working directory to the data directory and renamed the old gdbm file to use the name associated with the new MUSH. I deleted the FLAT and KILLED files associated with the other MUSH.
$ cd data
$ ls
mod_comsys.db mod_mail.db moondreaming.FLAT moondreaming.KILLED
mod_comsys.db.old mod_mail.db.old moondreaming.gdbm
$ mv moondreaming.gdbm sailormoon.gdbm
$ rm moondreaming.FLAT
$ rm moondreaming.KILLED
I then moved up to the main diectory for the MUSH and removed all of the backup files from the other MUSH, which are in the backups directory.
$ cd ..
$ ls
moondreaming.0310-2131.tar.gz moondreaming.0316-1729.tar.gz
moondreaming.0315-1900.tar.gz moondreaming.1007-1416.tar.gz
$ rm backups/*
I then ran ./Startmush
$ ./Startmush
./Startmush: line 83: [: : integer expression expected
Indexing help.txt
1004 topics indexed
Indexing mushman.txt
395 topics indexed
Indexing news.txt
...
62 topics indexed
Indexing plushelp.txt
line 4: line too long
line 9: line too long
line 142: line too long
line 229: line too long
line 254: line too long
line 282: line too long
line 655: line too long
line 680: line too long
line 880: line too long
42 topics indexed
Indexing qhelp.txt
18 topics indexed
Indexing wizhelp.txt
379 topics indexed
Indexing wiznews.txt
1 topics indexed
Checking for database files and creating backups of old files.
tail: sailormoon.log: No such file or directory
Saving old comsys module db.
Saving old mail module db.
ls: sailormoon.log.*: No such file or directory
No previous game log.
Log cleanup done.
Process 19086
071007.164045 TinyMUSH INI/START: Starting: TinyMUSH version 3.1 patchlevel 4 #1 [10/11/2006]
071007.164045 TinyMUSH INI/START: Build date: Sat Mar 10 21:25:06 EST 2007
071007.164045 TinyMUSH INI/START: Build info: ./configure
gcc -g -I./gdbm-1.8.0
071007.164045 TinyMUSH CNF/MOD : Loaded module: comsys
071007.164045 TinyMUSH CNF/MOD : Loaded module: mail
071007.164045 SailorMoonMUSH INI/LOAD : Using gdbm file: sailormoon.gdbm
071007.164045 SailorMoonMUSH INI/LOAD : Loading object structures.
071007.164045 SailorMoonMUSH INI/LOAD : Loading db: data/mod_mail.db
071007.164045 SailorMoonMUSH INI/LOAD : Loading db: data/mod_comsys.db
071007.164045 SailorMoonMUSH INI/LOAD : Load complete.
071007.164045 SailorMoonMUSH CFG/UPDAT: God(#1) entered config directive: money_name_singular with args 'Moon Coin'. Status: Success.
071007.164045 SailorMoonMUSH CFG/UPDAT: God(#1) entered config directive: money_name_plural with args 'Moon Coins'. Status: Success.
071007.164045 SailorMoonMUSH INI/LOAD : Startup processing complete.
071007.164045 SailorMoonMUSH NET/SLAVE: DNS lookup slave started on fd 1
071007.164045 SailorMoonMUSH INI/LOAD : Cleanup completed.
Don't worry about the "integer expression expected", the first time
the Startmush
is run for the MUSH; it won't appear the
next time you use Startmush
.
After the MUSH loaded, I logged in as god and changed the password.
@password oldpassword=newpassword
Password changed.