I have tried to set up a scheduled backup of my Minecraft server. I used a script I found on GitHub at frdmn/minebackup.sh and it seems to work great when I run it from the terminal directly.
The cronjobs I have set up however doesn't work for some reason. In mails I get these error messages:
Hexxit Server is running, suspending saves... su: must be run from a terminal
su: must be run from a terminal
su: must be run from a terminal
done
Backing up hexxit-01... done
Total backup size (175 MiB) <= (5000 MiB)... done
Hexxit Server is running, re-enabling saves... su: must be run from a terminal
su: must be run from a terminal
done
The main problem seems to be su: must be run from a terminal
and I assume this has to do with security issues on the server and not the script, so that's why I'm asking here.
It's more or less a freshly installed instance of Debian 7.1.0 x64 with one user on it, mc
. How do I fix it so that this script runs successfully?
The cronjobs look like this and have been added using crontab -e
*/15 * * * * /usr/bin/minebackup backup
0 0 * * * /usr/bin/minebackup backup full
I've been searching around for a bit and I have a feeling I need to edit /etc/sudoers
, but the line which I was supposed to comment away isn't even in the file, so I don't know if Debian has changed its defaults or... eh?
Defaults env_reset
Defaults mail_badpass
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
root ALL=(ALL:ALL) ALL
%sudo ALL=(ALL:ALL) ALL
#includedir /etc/sudoers.d
try editing /etc/sudoers using visudo and comment out: