View Single Post
Old November 9th, 2004, 01:12 AM

alexti alexti is offline
First Lieutenant
Join Date: Dec 2003
Location: Calgary, Canada
Posts: 762
Thanks: 0
Thanked 0 Times in 0 Posts
alexti is on a distinguished road
Default Re: Request for auto backup of turn files

I do these backups in a very simple fashion: by running a script on Dom2 start (and on hosting too - for SP).

Here's the script: save_script.awk

timestamp_file = "Last-total-save-timestamp.txt";
t = systime();
stamp = strftime("%Y%m%d-%H%M%S",t);
stamp2 = strftime("%Y-%m-%d",t);
saveAll = 1;
if ((getline Last_stamp < timestamp_file) > 0)
if (stamp2 == Last_stamp)
saveAll = 0;

if (saveAll)
cmd = sprintf("zip -r save-all-%s * -i@save.lst",stamp);
print stamp2 > timestamp_file;
cmd = sprintf("zip -r -t %s save-%s * -i@save.lst",Last_stamp,stamp);

You'd need to insert
gawk -f save_script.awk into your Dom2 startup

And you'll need save.lst:


That's the only Dom2-specific file.
Reply With Quote