Ich habe für meinen Minecraft Gameserver Dieses(ganz unten) Script etwas verändert:
Code: Alles auswählen
#!/bin/bash
# Set these values to match your server's settings.
# Make sure you change this to the name of your world folder!
# Add additional worlds by separating them with a space.
declare -a worlds=(world world_nether world_the_end)
backupdir=backups/
ext=.zip
hdateformat=$(date '+%Y-%m-%d-%H-%M-%S')H$ext
ddateformat=$(date '+%Y-%m-%d')D$ext
numworlds=${#worlds[@]}
echo "Starting multiworld backup..."
screen -S bukkit -X stuff $'bc server Welten werden gesichtert\n'
if [ -d $backupdir ] ; then
sleep 0
else
mkdir -p $backupdir
fi
zip $backupdir$hdateformat -r plugins
for ((i=0;i<$numworlds;i++)); do
screen -S bukkit -X stuff $'bc server Backup von §4'+${worlds[$i]+' wird erstellt\n'
zip $backupdir$hdateformat -r ${worlds[$i]}
echo "Saving '${worlds[$i]}' to '$backupdir$hdateformat'."
done
cp $backupdir$hdateformat $backupdir$ddateformat
echo "Updated daily backup."
find $backupdir/ -name *H$ext -mtime +2 -exec rm {} \;
find $backupdir/ -name *D$ext -mtime +14 -exec rm {} \;
echo "Removed old backups."
screen -S bukkit -X stuff $'bc server Backup beendet\n'
echo "Backup complete."
exit 0
Weis jmd. was Falsch ist?