pedja
February 10, 2006, 9:25pm
1
It would ne good to have MT name backup files using system identification. I fone maintains several MT boxes it is complicated to keep backups if they all have similar names looking like MikroTik+DateTime.
Naming scheme could be Mikrotik + SystemIdentity +DateTime.
Wyoming
February 13, 2006, 11:52pm
2
if you use the full command you can name the file anything you want.
system backup save name=name.bak
pedja
February 18, 2006, 8:06am
4
That is ok, but I still think default naming scheme should be such that they are unique per MT host. That would make autoamting backups much easier.
Also I notuiced that date part ov file name uses ddmmyyyy format. It would be better to be yyyymmdd to be easily sorted by date.
Not exactly “default”, but you can do some nice things with scripts:
:local NAME [/sys identity get name]
:local TIME [/sys clock get time]
:local DATE [/sys clock get date]
:local MO [:pick $DATE 0 3]
:local DY [:pick $DATE 4 6]
:local YR [:pick $DATE 7 11]
:set DATE ($YR . "-" . $MO . "-" . $DY)
/system backup save name=($NAME . "_" . $DATE . "_" . $TIME . ".backup" )
Season to taste,
–Eric
GotNet
February 20, 2006, 9:57pm
6
eflanery:
Not exactly “default”, but you can do some nice things with scripts:
:local NAME [/sys identity get name]
:local TIME [/sys clock get time]
:local DATE [/sys clock get date]
:local MO [:pick $DATE 0 3]
:local DY [:pick $DATE 4 6]
:local YR [:pick $DATE 7 11]
:set DATE ($YR . "-" . $MO . "-" . $DY)
/system backup save name=($NAME . "_" . $DATE . "_" . $TIME . ".backup" )
Season to taste,
–Eric
Just gotta say that is simple and sweet!
Mike
pedja
February 21, 2006, 9:38pm
7
This looks like going downtown using airplane
And it does not work what I suggested.
normis
February 22, 2006, 6:48am
8
why not? i think it does exactly what you asked …
pedja
February 22, 2006, 7:08am
9
Month is not a number, so sorting by name, would not order files by creation date and time.
Point of my idea is that it is logical to name files in that manner that they can be sorted out by creation date and time regardles file date and time (when you download backup files to other computer, creation date and time are changed, but file name is not.
It is matter of usability, what is most useful, should be default.
Personally, I think the default is most useful.
When the backup collector grabs the file via scp, it has a predictable name.
But, if you want:
:local NAME [/sys identity get name]
:local TIME [/sys clock get time]
:local DATE [/sys clock get date]
:local NUMMO ("jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec")
:local MO ( [:find $NUMMO [:pick $DATE 0 3] ] + 1 )
:local DY [:pick $DATE 4 6]
:local YR [:pick $DATE 7 11]
:set DATE ($YR . "-" . $MO . "-" . $DY)
/system backup save name=($NAME . "_" . $DATE . "_" . $TIME . ".backup" )
–Eric
pedja
February 24, 2006, 8:53am
11
Ok, I give up. I did not ask how to do it, but asked it to be simplified.