Whenever I use "get date" as the name-value parameter my script won't work correctly "script error: invalid filename", without "date" it would run fine.
Terminal check
Code: Select all
] > :local date [/system clock get date]; put $date;
] > may/16/2022
Code: Select all
:log info "backup beginning now"
:global name=backupfile value=([/system identity get name] ."-". [/system resource get uptime] . "-" . [/system clock get time].".backup")
/system backup save name=$backupfile
:log info "backup pausing for 10s"
:delay 10s
:log info "backup being uploaded"
/tool fetch address=aa.bb.cc.dd src-path=$backupfile user=username@local.lan mode=ftp password="securepassword" dst-path="/$backupfile" upload=yes;
:log info "backup finished"
:delay 20s
:log info "Deleting Backup File"
/file remove $backupfile;
:log info "Deleting Backupfile File"