2015年8月22日

RouterOS自動ftp上傳config備份檔

在RouterOS中加入以下Script檔(ftpbackup),並設定排程每日備份
#產生.backup與.rsc備份檔
/system backup save name=[/system identity get name] dont-encrypt=yes
delay 3
/export file=[/system identity get name]
delay 3
#指定遠端ftp目錄存檔路徑
:local filersc "/BACKUP/RouterOS-Backup/$[/system identity get name].rsc"
:local filebackup "/BACKUP/RouterOS-Backup/$[/system identity get name].backup"
:put $filersc;
:put $filebackup;
#設定帳密登入ftp後,上傳config檔至ftp主機
/tool fetch address=192.168.99.15 src-path=([/system identity get name].".rsc") mode=ftp user=ftpadmin password=xxxx upload=yes dst-path=($filersc)
/tool fetch address=192.168.99.15 src-path=([/system identity get name].".backup") mode=ftp user=ftpadmin password=xxxx upload=yes dst-path=($filebackup)
(繼續閱讀...)

Copyright © 2009 New Life in Taipei All rights reserved. Theme by Laptop Geek. | Bloggerized by FalconHive.