Minetest:Backup
From Rabbi Blog
Backing up your world is highly recommended, especially when experimenting with Minetest:Mods.
Linux
Backup Script
This script is under testing and editing or adding additional script approaches is welcomed. Ideally the script would be run as a cronjob.
Script
ps -A|grep -i minetest ps auxwww|grep -i minetest|awk '{print "kill -9 "$2}' |sh ps -A|grep -1 minetest NOW=$(date +"%Y%m%d%H%M") tar -zcf "minetest4_$NOW.tar.gz" minetest4 rm debug.txt rm nohup.out nohup ./minetest4/bin/minetestserver & ps -A|grep -i minetest
Explanation
- visually show if minetest is running
- find and kill the process
- verify it is not running visually
- get today's date and time
- create a gzip file of the entire minetest server directory
- remove the debug.txt file (housecleaning)
- remove the nohup.out file (housecleaning)
- start the server running again under nohup
- visually show if minetest is running