Hello
I like to have script that do backup of all devices that I have.
So, file name is created using “Device Identity” and “Device ROS version”. That part on script work.
Now, I like to sand that file IN SAME NAME how is created to FTP server. So I put “???” on that part of that script, any combination that I try don’t work. I can’t
src-path= need to be file that is created src-path=“$[/file get “$[/file find name ~”.backup”]“]” amd dst-path= is path to folder where I will keep this backup.
How to solve this ?
\
Create backup file and export the config.
/system backup save encryption=aes-sha256 name=“$[/system identity get name]-$[/system package get number=0 version]” password=xxxxxxxx
:log info " Local Backup Created Successfully"
delay time to finish the create - increase it if your backup file is big
:delay 10s
Upload backup file to FTP server.
/tool fetch address=10.20.20.254 src-path=“$[/file get “$[/file find name ~”.backup”]“]”
user=xxxxx mode=ftp password=xxxxxxxxxxxxx
dst-path=/xxxxxx/xxxxxxx/xxxxxx/xxxxxxxx/??? upload=yes port=21
:log info “Backup Uploaded Successfully”
delay time to finish the upload
:delay 10s
Delete created backup files once they have been uploaded
/file remove [find name~“.backup”]
:log info “Local Backup File Deleted Successfully”