Backup your mud with this shell script!

  • rudeboyrave
  • rudeboyrave's Avatar Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
More
1 year 9 months ago #6198 by rudeboyrave
Backup your mud with this shell script! was created by rudeboyrave
Create a file named backup.sh in your root directory for your mud account and edit the lines below to match the paths to your world, obj and any directories you want backed up. simply do a "./backup.sh" from your shell prompt to do a quick backup when you need to.
#!/bin/bash
BACKUP_DIR="/home/cyber/backups"
time=`date '+%m'-'%d'-'%y'`
tar -cvzf $BACKUP_DIR/CA.player.backup-$time.tgz /home/cyber/CA.conversion/lib/plr*
tar -cvzf $BACKUP_DIR/CA.code.backup-$time.tgz /home/cyber/CA.conversion/src/
tar -cvzf $BACKUP_DIR/CA.world.backup-$time.tgz /home/cyber/CA.conversion/lib/world/
tar -cvzf $BACKUP_DIR/CA.storage.backup-$time.tgz /home/cyber/CA.conversion/lib/storage/
tar -cvzf $BACKUP_DIR/CA.world.backup-$time.tgz /home/cyber/CA.conversion/lib/world/
tar -cvzf $BACKUP_DIR/CA.vehicle.backup-$time.tgz /home/cyber/CA.conversion/lib/vehicles
echo done.

CyberASSAULT
www.cyberassault.org
cyberassault.org 11111
A post-apocalyptic, sci-fi MUD.

Please Log in or Create an account to join the conversation.

More
1 year 3 months ago #6636 by Krell
Replied by Krell on topic Backup your mud with this shell script!
You must be a Linux user, because you seem to think that all shells are Bourne again! (See what I did there?).

Anyhow, that's a nice little script though I'd probably change the hash-bang to point at simple Bourne to make it more portable for those of us who don't use BASH. Thanks for posting your script. :-)

Please Log in or Create an account to join the conversation.

Time to create page: 0.949 seconds