#!/bin/sh # Script Created By : Deepak Chopra, Dt.: 24/06/2010 # Defining environment Variables dash="_" hn=`hostname` fileDT=`date +%d%m%y` cd /cf/root/ # move to directory where you will get the latest configuration file cd /config # copy latest configuration file having name juniper.conf.gz to /cf/root direcotry # adding with hostname and Date instead of its original name i.e. "juniper" cp juniper.conf.gz /cf/root/$hn$dash$fileDT.conf.gz cd /cf/root #Daily Backup Script for backing up /home ALL Users and SMR_DATEN1 echo Time backup started = $(date +%T) before="$(date +%s)" datestamp="$(date)" tempdate="$(date +%F)" ######################################## # HOST='192.168.1.1' # FTP Server IP USER='mind' # FTP User Name PASSWD='test$789' # FTP User's Password ftp -n -v $HOST << EOT user $USER $PASSWD cd deepakchopra # Location where you want to copy the backup configuration file mput *.conf.gz bye EOT