Thread: Utility Linux Admining
View Single Post
  #47  
Old September 24th, 2009, 09:24 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

Most of my backup script is about finding the current turn number and handling edge cases like being somehow called to backup a non-existent game (not detecting conditions like that will at best result in the script crashing and at worst data loss as it goes blindly ahead to do something stupid).


Doing
Code:
--preexec /home/dom/backup.sh "$GAME"
and
Code:
#!/bin/bash
rsync -a "/home/dom/dominions3/savedgames/$1" /home/dom/dominions3/backup
would have your backup command be parametrised by game name, so it'll backup each game to separate directory. Though I guess that might have been what you meant?
Reply With Quote
The Following User Says Thank You to Ornedan For This Useful Post: