Page 1 of 1

automated system update

Posted: Fri Mar 10, 2006 2:58 pm
by mag
i'm going to automate system update within a few mt-router networks and like to ask a few questions, i could not find answers to yet.

there is an undocumented paramter (2.9.x):

/ system upgrade mirror
set enabled=no primary-server=0.0.0.0 secondary-server=0.0.0.0 check-interval=1d user=""

anyone an explanation? why is not in the manual, neither online, nor pdf. looks like something to automate upgrading?!

otherwise i had probably to use a system script, checking for new available update(s), downloading it and restarting the router by scheduler?

i found one forum-message concerning this: http://forum.mikrotik.com//viewtopic.php?t=4818

BTW which protocol is used for this, ftp, scp?
i'm using scp to copy files from and to the routers with ftp and telnet usually disabled.

TIA

Posted: Mon Mar 13, 2006 10:07 am
by mag
Hm, am i alone with this problem? How do other people upgrade their large quantities of MT-boxes? ;-)

I tried to configure and to use "system upgrade mirror" but it seems to do nothing at all.

any hints?

Posted: Mon Mar 13, 2006 1:45 pm
by normis
this is not used now, we planned to make special upgrade server but this has not been done yet

Posted: Mon Mar 13, 2006 3:12 pm
by mag
thanks for the information!


i wrote a little script for my purposes:
/ system upgrade upgrade-package-source 
add address=<ip-> user="<user>" 
password="<password>" 

/system scheduler
add name=sched_upgrade on-event=upgrade start-date=jan/01/2006 start-time=02:00:00 interval=1d

/system script 
add name=upgrade source={/system upgrade refresh
	:if([/system upgrade get [/system upgrade find source=<ip>] status]!="installed")
		do={/system upgrade download-all reboot-after-download=yes}
	}
btw. system upgrade seems using the winbox port.

Posted: Mon Apr 09, 2007 7:54 pm
by kreigh
I seem to be having some issues with this script, I can't get it to run at all. Nothing in the log, and run-count will not increment.

Any ideas?

Thanks,
-Russ

Posted: Tue Apr 10, 2007 2:27 pm
by kreigh
Nevermind, I figured out something else.

Thanks,
-Russ
I seem to be having some issues with this script, I can't get it to run at all. Nothing in the log, and run-count will not increment.

Any ideas?

Thanks,
-Russ

Posted: Tue May 08, 2007 1:13 pm
by SweetSunday
Nevermind, I figured out something else.

Thanks,
-Russ
Care to share it with us?

Posted: Thu May 10, 2007 5:10 pm
by hawkeyebj
/system script
add name=upgrade source={/system upgrade refresh
:if([/system upgrade get [/system upgrade find source=<ip>] status]!="installed")
do={/system upgrade download-all reboot-after-download=yes}
}
My question is the script works fine up to the point to where its suspose to excute the :do Command but it will not start downloading the new package and then reboot and install.
Yes it increments and shows that it ran.

Re:

Posted: Sat Mar 22, 2014 4:43 pm
by HaPe
this is not used now, we planned to make special upgrade server but this has not been done yet
Hi, any progress with this feature? Is it possible to run own mirror for example on ftp?

Re: automated system update

Posted: Sun Mar 23, 2014 3:58 pm
by 385esantic
/system scheduler
add interval=1d name=update on-event="/system package update\r\
    \ncheck-for-updates\r\
    \n:delay 1s;\r\
    \n:if ( [get current-version] != [get latest-version]) do={ upgrade }" policy=\
    ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api start-date=jan/01/2010 start-time=00:00:00
I am using this and works fine for me on ROS version 6.x