There's a piece of code out there that automatically does this every time a player logs off. However, here's the script I use for backing DR up nightly. You'll have to modify it quite a bit to get it to work, but at least you can see one way of doing it. As far as doing just the player files, why create a script for a simple three command piece of work? cp -r -f /path/to/player/directory /path/to/temp/directory cd /path/to/temp/directory tar zcvf players.tgz *
On Sat, 2002-03-30 at 20:36, Despret, Jerome wrote: > Anyone have a perl or shell to backup the player directory > and label it , like every days ? > > Not that it's complicated, but I'm sure most of you have that > and it could be usefull to others. > > Thank > > Silfen > > www.fangels.org > telnet://fangels.wolfpaw.net:6000 > ____________________________________ > Jerome Despret > The Sims Online > Oracle database architech > > > -- > ROM mailing list > [email protected] > http://www.rom.org/cgi-bin/mailman/listinfo/rom > >
#!/bin/sh
HOMEDIR=/home/twhiting
SRCDIR=/home/twhiting/beta/src
MUDDIR=/home/twhiting/xanth
WEBDIR=/home/twhiting/public_html
BACKTMPDIR=/tmp/.btmp
BACKDEST=/home/twhiting/tmp
PATH=/bin:/usr/bin:/sbin
DATE=`date +%m%d%y`
cd $WEBDIR
tar zcvf /home/twhiting/mudweb.tgz *
cd $BACKTMPDIR
mkdir web
cd $HOMEDIR
mv mudweb.tgz $BACKTMPDIR/web
cd $BACKTMPDIR/web
tar zxvf mudweb.tgz
cd $MUDDIR
tar zcvf /home/twhiting/mudtemp.tgz *
cd $HOMEDIR
mv mudtemp.tgz $BACKTMPDIR
cd $BACKTMPDIR
tar zxvf mudtemp.tgz
cd $SRCDIR
cp -r -f * $BACKTMPDIR/src
cd $BACKTMPDIR
echo "changing to directory and unpacking files"
find -name 'core' -exec rm {} \;
find -name 'orphan' -exec rm {} \;
find -name 'mudname' -exec rm {} \;
find -name '*.log' -exec rm {} \;
find -name '*.o' -exec rm {} \;
find -name '*.save' -exec rm {} \;
find -name '*.old' -exec rm {} \;
find -name '2k' -exec rm {} \;
find -name '*.orig' -exec rm {} \;
find -name '*.tgz' -exec rm {} \;
find -name '*.gz' -exec rm {} \;
echo "done with the removing"
rm -r -f *.tgz
tar cpf mud2k.$DATE.tar *
bzip2 mud2k.$DATE.tar
mv mud2k.$DATE.tar.bz2 $BACKDEST
rm -r -f *
echo "ftp'ing to the server"
ncftpput -u username -p password host /full/path/to/directory $BACKDEST/mud2k.$DATE.tar.bz2
echo "removing the actual backup"
#rm -r -f $BACKDEST/mud2k.$DATE.tar.bz2
signature.asc
Description: This is a digitally signed message part

