Reply To: save the syslog´s in a File on a Ftp Server oder of the CF ?

Home Page Forums Network Management Embedded Devices save the syslog´s in a File on a Ftp Server oder of the CF ? Reply To: save the syslog´s in a File on a Ftp Server oder of the CF ?

#45011

Tobias83
Member

Hello, i wrote an little Script in Crontab to save my Logfiles to an Storage because we used it for Hotel WLAN Access:

# Bash script: SaveLogs-Cron
tar -cvf /DB/logs`date +%G%d%b`.tar /Database/LOG/`date +%G`/`date +%b`/`date +%d`/SecureGW/*
gzip /DB/logs`date +%G%d%b`.tar
ftp -i -n “IP OF FTP HOST” <<EOF
user “USername” “Password of FTP”
cd “Folder to Save”
bin
put /DB/logs`date +%G%d%b`.tar.gz logs`date +%G%d%b`.tar.gz
bye
EOF
rm -f /DB/logs`date +%G%d%b`.tar.gz

Hope it help… or write me again … Auch gern in Deutsch 😉