Thread: Utility Linux Admining
View Single Post
  #45  
Old September 24th, 2009, 04:04 AM

Ornedan Ornedan is offline
Private
 
Join Date: May 2008
Posts: 29
Thanks: 3
Thanked 4 Times in 4 Posts
Ornedan is on a distinguished road
Default Re: Linux Admining

Quote:
Originally Posted by Lihaässä View Post
Code:
#!/bin/bash
rsync -a /home/dom/dominions3/savedgames/ /home/dom/dominions3/backup/
I see a couple of problems here:
  • You copy all games every time any game hosts. Which clobbers the backups of all games other than the one about to be hosted.
  • You only maintain a backup of the latest turn. This will cause trouble when the game manages to **** itself up so that it crashes at next hosting, because by the time you notice it crashing, you've clobbered the backup from before it broke.
    (Yes, this can happen. Guess what made me think it was a good thing I was already backing up all truns?)

If you look approximately halfway up the thread, I've posted a backup script that has neither of those particular issues.
Reply With Quote
The Following User Says Thank You to Ornedan For This Useful Post: