Guest User

backup script

a guest
Feb 24th, 2013
48
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. sleep 15
  2. if pidof minetestserver
  3. then
  4.     mtmsg server_world_2 "Server restarting in 60 seconds"
  5.     sleep 1
  6.     mtmsg server_world_2 "Routine daily backup, will be back in a minute"
  7.     sleep 29
  8.     mtmsg server_world_2 "Server restarting in 30 seconds"
  9.     sleep 1
  10.     mtmsg server_world_2 "Routine daily backup, will be back in a minute"
  11.     sleep 19
  12.     mtmsg server_world_2 "Server restarting in 10 seconds"
  13.     sleep 1
  14.     mtmsg server_world_2 "Routine daily backup, will be back in a minute"
  15.     sleep 9
  16.     mtmsg server_world_2 "/shutdown"
  17.     sleep 10
  18.     cd ~/.minetest/worlds/server_world_2
  19.     #git commit -a -m $(date +"%G-%m-%d") --author menche
  20.     cp -r ~/.minetest/worlds/server_world_2 ~/.minetest/world-backups/server_world_2.$(date + "%G-%m-%d")
  21.     mv ~/.minetest/debug.txt ~/.minetest/debug.txt.$(date +"%G-%m-%d")
  22.     ~/Programs/minetest/bin/minetestserver --map-dir ~/.minetest/worlds/server_world_2 --port 30000
  23. else
  24.     ~/Programs/minetest/bin/minetestserver --map-dir ~/.minetest/worlds/server_world_2 --port 30000
  25. fi
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×