A simple script to back up log files (or anything else) using rsync.
$source to the location of your IRC logs.$backup_to to the backup folder.-q
to suppress output (useful for cron jobs).#!/bin/bash
source="user@host:path/to/logs"
backup_to="$HOME/backup/logs"
rs="rsync --modify-window=1 -hamz -F"
ssh="ssh -xac blowfish"
[ "$1" = "-q" ] && rs="$rs -q" || rs="$rs --progress"
if [ -d "$backup_to" ]; then
$rs -e "$ssh" "$source/" "$backup_to/" || exit 1
else
echo "Cannot find $backup_to"
exit 1
fi