Recursion
03-11-2010, 10:02 PM
Yo,
I just moved my private MC server over to Windows and before I lost my Linux VPS I thought I'd chuck this script I wrote up, there are probably better ways of doing this but I don't really care, it was quick and easy and I'm not editing it for anyone right off the bat unless they ask me to and provide the information in this thread :P
Basically it will save your map, turn map saving off, copy your world folder as a backup to somewhere, turn saving on, run the C10t cartographer twice with different options and save the Cartographs in a folder somewhere.
It assumes the c10t Cartographer binary is in "/root"
It assumes your Minecraft server and the Multiplexer Client are in "/root/Minecraft"
It saves world backups into "/root/worlds/world-Current Backup Time"
It will save the Cartographs in "/var/www/Carts"
1. This only works on Linux
2. You MUST be using Multiplexer wrapper for this to work, you can grab it HERE (http://www.minecraftforum.net/viewtopic.php?f=1012&t=25194)
3. You need to get the Multiplexer client from HERE (http://code.google.com/p/minecraftadmin/source/browse/trunk/Multiplexer)
3. You'll need to download c10t Cartographer from HERE (http://www.minecraftforum.net/viewtopic.php?f=25&t=33803)
4. You'll need to make a "worlds" folder in "/root".
4. Copy this script into a .sh file:
#!/bin/bash
time=`date +%d-%m-%Y_%R`
cd /root/Minecraft
python multiclient.py say Starting world backup...
python multiclient.py save-all
python multiclient.py save-off
cp -R /root/Minecraft/world /root/worlds/world-$time
python multiclient.py save-on
python multiclient.py say World backup complete!
python multiclient.py say Starting cartographs...
cd /root
./c10t -q -w /root/worlds/world-$time -o /root/public_html/Carts/$time-Carto-Oblique.png
cd /root/Minecraft
python multiclient.py say Oblique Cartograph available, sheldon.socialee.me/Carts
cd /root
./c10t -w /root/worlds/world-$time -o /root/public_html/Carts/$time-Carto.png
cd /root/Minecraft
python multiclient.py say Normal Cartograph available, sheldon.socialee.me/Carts
python multiclient.py say Cartographing complete!
5. Make it executable with "chmod +x NAME.sh"
6. Set up a Cron job to run the script ;)
Hope someone finds it useful :)
I just moved my private MC server over to Windows and before I lost my Linux VPS I thought I'd chuck this script I wrote up, there are probably better ways of doing this but I don't really care, it was quick and easy and I'm not editing it for anyone right off the bat unless they ask me to and provide the information in this thread :P
Basically it will save your map, turn map saving off, copy your world folder as a backup to somewhere, turn saving on, run the C10t cartographer twice with different options and save the Cartographs in a folder somewhere.
It assumes the c10t Cartographer binary is in "/root"
It assumes your Minecraft server and the Multiplexer Client are in "/root/Minecraft"
It saves world backups into "/root/worlds/world-Current Backup Time"
It will save the Cartographs in "/var/www/Carts"
1. This only works on Linux
2. You MUST be using Multiplexer wrapper for this to work, you can grab it HERE (http://www.minecraftforum.net/viewtopic.php?f=1012&t=25194)
3. You need to get the Multiplexer client from HERE (http://code.google.com/p/minecraftadmin/source/browse/trunk/Multiplexer)
3. You'll need to download c10t Cartographer from HERE (http://www.minecraftforum.net/viewtopic.php?f=25&t=33803)
4. You'll need to make a "worlds" folder in "/root".
4. Copy this script into a .sh file:
#!/bin/bash
time=`date +%d-%m-%Y_%R`
cd /root/Minecraft
python multiclient.py say Starting world backup...
python multiclient.py save-all
python multiclient.py save-off
cp -R /root/Minecraft/world /root/worlds/world-$time
python multiclient.py save-on
python multiclient.py say World backup complete!
python multiclient.py say Starting cartographs...
cd /root
./c10t -q -w /root/worlds/world-$time -o /root/public_html/Carts/$time-Carto-Oblique.png
cd /root/Minecraft
python multiclient.py say Oblique Cartograph available, sheldon.socialee.me/Carts
cd /root
./c10t -w /root/worlds/world-$time -o /root/public_html/Carts/$time-Carto.png
cd /root/Minecraft
python multiclient.py say Normal Cartograph available, sheldon.socialee.me/Carts
python multiclient.py say Cartographing complete!
5. Make it executable with "chmod +x NAME.sh"
6. Set up a Cron job to run the script ;)
Hope someone finds it useful :)