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

 #!/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
# www.dickson.me.uk-(date format: Day Month Year).tgz
SRCD="/www/www.dickson.me.uk/root/"
TGTD="$HOME/"
OF=www.dickson.me.uk-$(date +%d%m%Y).tgz
echo
echo "Tarring and compressing webpages"
echo
tar -cpZf $TGTD$OF $SRCD

About billy

Senior IT Technician working in Edinburgh, Scotland.
This entry was posted in Linux. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>