I read many discussions on this topic with apparently no solution in general case.
So, to be more specific, I would like to save undo and or redo properties of some /system/histroy/print details, in a terminal-compatible way.
The closest approximation I found is something like this:
Code: Select all
:local history [/system/history/print detail as-value]
:local historylength [:len $history]
:if ($historylength > 0) do={
:for i from=($historylength-1) to=0 step=-1 do={ /system/history/print append file="usb/backup/redolist.txt" detail proplist=redo where .id=([:pick $history $i]->".id") }
}
Code: Select all
# 2023-11-13 22:00:00 by RouterOS 7.12
# software id = G8
#
Flags: U - undoable, R - redoable, F - floating-undo
F
redo=
/ip service set www address=192.168.220.0/24,192.168.220.0/24 disabled=\
no port=80 vrf=main