I tried running this script to a windows machine running FileZilla and it doesnt quite work. The only output on the log show script, info and the file names. The files are not even created on the router flash. Any ideas? OS is 6.39.2.
\
ftp server
:local ftphost "192.168.47.26"
:local ftpuser "rbackup"
:local ftppassword "********"
:local ftppath "/filezilla/routerbackups"
#GetDate
:local GDate [/system clock get date]
:local GDay [ :pick $GDate 4 6 ]
:local GMonth [ :pick $GDate 0 3 ]
:local GYear [ :pick $GDate 7 11 ]
:local GResult "$GDay $GMonth $GYear"
\
file name for user manager backup
:local UserMan ([/system identity get name].".umb")
:log info $UserMan
file name for system backup
:local BackupConf ([/system identity get name].".backup")
:log info $BackupConf
file name for config export
:local ExportConf ([/system identity get name].".rsc")
:log info $ExportConf
backup the data
/tool user-manager database save name=$UserMan overwrite=yes
:log info message="User manager backup finished (1/3).";
/system backup save name=$BackupConf
:log info message="System backup finished (2/3).";
/export compact file=$ExportConf
:log info message="Config export finished (3/3)."
upload the user manager backup
:log info message="Uploading user manager backup (1/3)."
/tool fetch address="$ftphost" src-path=$UserMan user="$ftpuser" mode=ftp password="$ftppassword" dst-path="$ftppath/$GResult-$UserMan" upload=yes
upload the system backup
:log info message="Uploading system backup (2/3)."
/tool fetch address="$ftphost" src-path=$BackupConf user="$ftpuser" mode=ftp password="$ftppassword" dst-path="$ftppath/$GResult-$BackupConf" upload=yes
upload the config export
:log info message="Uploading config export (3/3)."
/tool fetch address="$ftphost" src-path=$ExportConf user="$ftpuser" mode=ftp password="$ftppassword" dst-path="$ftppath/$GResult-$ExportConf" upload=yes
delay time to finish the upload - increase it if your backup file is big
:delay 3s;
:log info message="Configuration backup finished.";