PennMUSH Community

Changeset 1304

Show
Ignore:
Timestamp:
10/03/08 16:16:21 (2 months ago)
Author:
shawnw
Message:

#487: Log file backup timestamps.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • 1.8.3/trunk/CHANGES.183

    r1300 r1304  
    1818Version 1.8.3 patchlevel 8                      ??? ??, 200?  
    1919  
     20Minor changes: 
     21 * The restart script appends a timestamp to the backups of 
     22   existing databases and log files that it makes. Suggested 
     23   by Ray, 
     24 
    2025Version 1.8.3 patchlevel 7                      Oct 01, 2008 
    2126 
  • 1.8.3/trunk/game/restart

    r1303 r1304  
    126126fi 
    127127 
    128 # Copy the last set of log files to save/ 
    129 mv -f log/*.log save/ 
     128# Copy the last set of log files to save/ with a timestamp. 
     129TIMESTAMP=`date +%Y%m%d%H%M%S` 
     130for log in log/*.log; do 
     131    BASE=`basename $log` 
     132    mv -f $log save/$BASE.$TIMESTAMP 
     133done 
    130134 
    131135if [ -r "data/$OUTDB$SUFFIX" ]; then 
    132    rm -f save/$INDB$SUFFIX.old 
    133    mv -f data/$INDB$SUFFIX save/$INDB$SUFFIX.old 
     136   ln -f data/$INDB$SUFFIX save/$INDB$SUFFIX.old 
     137   mv -f data/$INDB$SUFFIX save/$INDB$SUFFIX.$TIMESTAMP 
    134138   mv data/$OUTDB$SUFFIX data/$INDB$SUFFIX 
    135139else