Subj : small request To : Tracker1 From : Angus Mcleod Date : Sat Dec 11 2004 12:18 pm Re: small request By: Tracker1 to dove.synchronet.programmi on Sat Dec 11 2004 01:36:00 > would like a shell script that I can run as my sbbs user, that will... First, I'd like to suggest that you adopt a UNIX paragigm -- use separate scripts. Then call them as needed. Rather than have one enormous Microsoftian script to do everything. For backup, something like: #!/bin/bash DATESTAMP=`/usr/bin/date +%Y%m%d-%H%M` ARCHIVE=sbbs-${DATESTAMP}.tgz # required -- must be first OPTIONS="--create --gzip" # other possibly useful options [ -f sbbsbackup.exclude ] && OPTIONS="-X sbbsbackup.exclude" # OPTIONS="${OPTIONS} --dereference" # symlinks in or out? # OPTIONS="${OPTIONS} --absolute-paths" # careful! # required -- must be last OPTIONS="${OPTIONS} --file ${ARCHIVE}" /usr/bin/tar ${OPTIONS} /sbbs/ctrl /sbbs/data /sbbs/exec That will drop a date-stamped .tgz of the three directories in the current directory. Call this script from whatever script you use to cvs updare and make. To restore, just cd into /sbbs and tar xzvf .tgz optionally first erasing the directories. In sbbsbackup.exclude put a list of whatever files (if any) you DON'T want backed up, for instance, /sbbs/ctrl/localspy*.sock or whatever. Modifications may be necessary under non-Slackware. --- þ Synchronet þ Great programs on the Synchronet Channel at The ANJO BBS .