#!/bin/bash
#
# This program is created by VBird 2002/06/13
#
# What is this program?
# This program will backup the following messages:
# 1. MySQL data files ( /var/lib/mysql );
# 2. HTTP's CGI-directory ( /var/www/cgi-bin )
#
# HOW TO RUN THIS PROGRAM?
# Just put the file into /etc/crontab job,
# or put this file's link file to /etc/cron.daily!
#
###############################################################
# History
# Date What Who
#==============================================================
# 2002/06/13 First time to run this program
# The only backup files are MySQL and CGI VBird
#==============================================================
# 0. Get the date messages and backup directory
day=`date +%Y-%m-%d`
backup_dir="/home/scn/disk2/backup/daily"
ftp -in << EOF
open $host
user $user $password
cd $replace_dir
bin
put $targetfile2
put $sqlfilename.zip
EOF發表人:
MU 時間: 2008-10-13 09:28 PM
#!/bin/bash
#
# This program is created by VBird 2002/06/13
#
# What is this program?
# This program will backup the following messages:
# 1. MySQL data files ( /var/lib/mysql );
# 2. HTTP's CGI-directory ( /var/www/cgi-bin )
#
# HOW TO RUN THIS PROGRAM?
# Just put the file into /etc/crontab job,
# or put this file's link file to /etc/cron.daily!
#
###############################################################
# History
# Date What Who
#==============================================================
# 2002/06/13 First time to run this program
# The only backup files are MySQL and CGI VBird
#==============================================================
# 0. Get the date messages and backup directory
day=`date +%Y-%m-%d`
backup_dir="/home/scn/disk2/backup/weekly"