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:
tar Icvpf etc.tar.bz2 /etc/*
tar Icvpf websites.tar.bz2 /home/sites/*
tar Icvpf mysql.tar.bz2 /home/mysql/*
ls -l | mail email@example.com -s "Backup -- $HOST_TITLE"
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.