Backup Script

I’ve eventually written a simple backup script for this website. All I need to do now is write a SQL backup script that will will tar/compress the raw sql file and then e-mailed to me once a month *grin* maybe next year ehh. Click to see script

[code lang=”bash”] #!/bin/bash
# Filename: backweb
# Written by B Dickson 10/12/02
# Simple webpage backup script Version 1.0
# Ensure that this file is chmod 700
# SRCD = the source directory to backup
# TGTD = the destination directory to backup files to, in
# my case it will be my home directory
# OF = is the filename that will be created in this case
# format: Day Month Year).tgz
TGTD=”$HOME/”$(date +%d%m%Y).tgz
echo “Tarring and compressing webpages”
tar -cpZf $TGTD$OF $SRCD


Leave a Reply