Syed Jahanzaib Personal Blog to Share Knowledge !

October 7, 2010

inux Backup Script (Personnel) just for reference.

Filed under: Linux Related — Syed Jahanzaib / Pinochio~:) @ 8:07 AM

############################################
# AACABLE.NETWORK Backup Program v1.0 #
############################################

echo -e ” Backing up Data of GW.aacablenet.org . . . ”
# mount server4 d drive
# Directory for copying file
/usr/sbin/server4d
rm -fr /firewall/aacable/firewall.tar
cp -vr /firewall/aacable/* /mnt/server4/backup/mac/firewall/aacable/ –reply=yes
cp -vr /usr/local/mrtg-2/bin/* /mnt/server4/backup/mac/firewall/aacable/mrtgbackup –reply=yes
cp -vr /etc/httpd/conf/httpd.conf /mnt/server4/backup/mac/firewall/aacable/ –reply=yes
cp -vr /etc/samba/smb.conf /mnt/server4/backup/mac/firewall/aacable/ –reply=yes
cp -vr /var/named/chroot/var/named/aacablenet.org.hosts /mnt/server4/backup/mac/firewall/aacable/ –reply=yes
cp -vr /etc/mail/sendmail.cf /mnt/server4/backup/mac/firewall/aacable/ –reply=yes
cp -vr /etc/mail/sendmail.mc /mnt/server4/backup/mac/firewall/aacable/ –reply=yes

# tar / zip All Directories . . .
cd /firewall/aacable
tar zcvf /firewall/aacable/firewall.tar /firewall/ /usr/local/mrtg-2/bin /etc/httpd/conf/httpd.conf /etc/mail/sendmail.cf /etc/mail/access /etc/samba/smb.conf /etc/named.conf /var/named/chroot/var/named/aacablenet.org.hosts /mnt/server4/backup/mac/firewall/aacable/macbackup/
# Email to johny_reico@yahoo.com :d
# gzip -v9 /firewall/aacable/firewall.tar
mutt -s “Daily Backup of gw.aacablenet.org” -a /firewall/aacable/firewall.tar johny_reico@yahoo.com < /firewall/aacable/dobackup
rm -fr /firewall/aacable/firewall.tar
echo “Bakcup & email Done”

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: