Hi. I have made recently gotten a hold of a backup script. Not sure what i am doing wrong here, is this auto/ do i have to start it ? For some reason, it doesnt work when i do ./save.sh . It sends the message across the server, other than that i get errors. Anyhow here it is Code: #Copyright 2012 # #This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either #version 2 of the License, or (at your option) any later version. # #This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. #!/bin/sh while true; do DAY=`/bin/date +%m-%d-%Y@%H:%M` echo "*** Auto Backup Started @ $DAY ***" screen -S minecraft -X stuff "`printf "say Saving the server.\r"`" find /secondary -mmin +5 -exec rm -rf {} \; sleep 2 mkdir /secondary/BACKUP-$DAY mv server.log /root/Minecraft/server.log /secondary/BACKUP-$DAY/server.log cp /root/Minecraft/plugins/WorldGuard/worlds/LP3/regions.yml /secondary/BACKUP-$DAY/regions.yml cp /root/Minecraft/plugins/PermissionsEX/permissions.yml /secondary/BACKUP-$DAY/permissions.yml tar -cvzf /secondary/BACKUP-$DAY/server.tar /minecraft/server sleep 2 screen -S minecraft -X stuff "`printf "say Save complete.\r"`" echo Backup $DAY Complete. echo "" sleep 1h done
It has to be run manually or scheduled with a cronjob. It is assuming your server is running in screen with the screen name of minecraft. Are you running your server in screen with a name of minecraft?