I have set Hostname, system knows the current firmware and date/time on Mikrotik.
On my PC’s running Debian, when I backup my Firefox browser settings I execute:
tar -cvf BackUp_Firefox_$(hostname)_$(date +%Y%m%d-%H%M%S).tar -P ~/.mozilla/firefox/
so I guess, same approach does not work on MikroTik …
Executing the:
/export file=“$HOSTNAME_$FIRMWARE_$DATE-$TIME”
would result in file:
13 __-.rsc script 23.9KiB feb/08/2021 11:00:55
[admin@Mikrotik] > {/system; :put "$[identity get name]_$[routerboard get current-firmware ]_$[clock get date]-$[clock get time]"; / }
Mikrotik_7.1beta4_feb/08/2021-14:06:13
Or use
/system resource get version
instead of the installed firmware. You might also prefer
/system routerboard get serial-number
.
I used a curly brackets block to allow to “chdir” to /system, and save some typing, and then at the end “chdir” back to “/”. If you know bash, you’ll see that routeros uses