[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

backup script



Title: backup script

Hi Guys

I am trying to write a backup script that will backup etc configs, websites and mysql stuff then
email the sizes and time/date info etc.

This is what I have at the moment:

#!/bin/bash

HOST_TITLE="ns.smeesserver.co.uk"

cd /root
tar Icvpf etc.tar.bz2 /etc/*
tar Icvpf websites.tar.bz2 /home/sites/*
tar Icvpf mysql.tar.bz2 /home/mysql/*

ls -l | mail support@zdata.co.za -s "Backup -- $HOST_TITLE"

exit 0

------------------

Just battling to use awk to extract the last for collumns.

-rwxrwxr-x   1 root     root          [ 234 Mar 10 06:38 backup ]

Any help would be greatly appreciated. Shell scripting is definitely not one of my strong points.

Thanks
Craig


Reply to: