lftpによるネットワーク越しのディレクトリ同期
http://extstrg.asabiya.net/pukiwiki/index.php?lftp%A4%CB%A4%E8%A4%EB%A5%CD%A5%C3%A5%C8%A5%EF%A1%BC%A5%AF%B1%DB%A4%B7%A4%CE%A5%C7%A5%A3%A5%EC%A5%AF%A5%C8%A5%EA%C6%B1%B4%FC#!/bin/sh # ---------------------------- # lftp sync script # ---------------------------- # Version : 1.0 # DATE : 2008.03.18 # export LANG=C export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin # Set SERVER1="[SERVER IP]" MASTER="[コピー元パス]" MIRROR="[コピー先パス]" USER="[FTP USER]" PASS="[FTP PASSWORD]" EXECDATE=`date +%Y%m` LOGFILE="/home/system/logs/lftp-sync-"$EXECDATE".log" ## Exec echo "-------------------------------------------" >> $LOGFILE date +%Y/%m/%d/\ %H:%M:%S >> $LOGFILE # pukiwiki lftp -u $USER,$PASS $SERVER1 -e "mirror -e $MASTER $MIRROR ; quit" >> $LOGFILE 2>&1 date +%Y/%m/%d/\ %H:%M:%S >> $LOGFILE exit 0 # EOF
Last-modified: 2009-12-25 (金) 14:02:49 (5380d)