corz.org text viewer..
[currently viewing: /public/linux/usr/local/bin/corz-backup-lite.sh - raw]
#!/bin/bash
# last updated Friday May 17, 2013
#
# corz web site mirror backup script.. (lite version - no archiving)
#
# see "corz-backup", the "full" version, for notes.
#
# ;o) Cor
#

# get host name..
if [ -z $1 ]; then
    echo
    echo "Please supply a domain name on the command-line. e.g.."
    echo
    echo "$0 foobar.net"
    echo
    echo "corz-backup-lite will then use settings file: ~/.sftp/foobar.net"
    echo
    exit 1
fi

# grab settings..
. ~/.sftp/$1

echo "lite backup for $host: "`date "+%Y.%m.%d-%H.%M"`.. >> $logfile
echo "lite backup for $host (lite version - no gzipping)"

if [ ! -e $backupdir/$host ]; then
    mkdir -pv $backupdir/$host > /dev/null
fi

echo "copying (& logging) changed files to dev mirror.. [$backupdir]"
cp -d -f -p -r -u -vvv $home/**/bsp;$backupdir/$host >> $logfile
now=`date "+%Y.%m.%d-%H.%M"`

echo >> $logfile
command -v fortune >/dev/null 2>&1 || { echo "lite backup for $host complete!"; exit 0; }
fortune

echo "lite backup complete at $now"
exit 0

Welcome to corz.org!

Since switching hosts (I hope you are alright, Ed! Wherever you are …) quite a few things seems to be wonky.

Juggling two energetic boys (of very different ages) on Coronavirus lockdown, I'm unlikely to have them all fixed any time soon. Mail me! to prioritise!