Community discussions

MUM Europe 2020
 
User avatar
mag
Member
Member
Topic Author
Posts: 378
Joined: Thu Jul 01, 2004 12:32 pm
Location: Cologne, NRW, Germany
Contact:

automated system update

Fri Mar 10, 2006 2:58 pm

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
 
User avatar
mag
Member
Member
Topic Author
Posts: 378
Joined: Thu Jul 01, 2004 12:32 pm
Location: Cologne, NRW, Germany
Contact:

Mon Mar 13, 2006 10:07 am

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?
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 24424
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Mon Mar 13, 2006 1:45 pm

this is not used now, we planned to make special upgrade server but this has not been done yet
 
User avatar
mag
Member
Member
Topic Author
Posts: 378
Joined: Thu Jul 01, 2004 12:32 pm
Location: Cologne, NRW, Germany
Contact:

Mon Mar 13, 2006 3:12 pm

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.
 
kreigh
just joined
Posts: 3
Joined: Wed Jun 07, 2006 3:31 pm

Mon Apr 09, 2007 7:54 pm

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
 
kreigh
just joined
Posts: 3
Joined: Wed Jun 07, 2006 3:31 pm

Tue Apr 10, 2007 2:27 pm

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
 
SweetSunday
Member Candidate
Member Candidate
Posts: 296
Joined: Tue Nov 07, 2006 3:06 am

Tue May 08, 2007 1:13 pm

Nevermind, I figured out something else.

Thanks,
-Russ
Care to share it with us?
 
hawkeyebj
just joined
Posts: 5
Joined: Thu May 10, 2007 4:56 pm

Thu May 10, 2007 5:10 pm

/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.
 
HaPe
Member Candidate
Member Candidate
Posts: 232
Joined: Fri Feb 10, 2012 10:24 pm
Location: Poland

Re:

Sat Mar 22, 2014 4:43 pm

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?
In anticipation on new The Dude release.
 
385esantic
just joined
Posts: 11
Joined: Fri Jan 11, 2013 10:10 am
Location: Croatia

Re: automated system update

Sun Mar 23, 2014 3:58 pm

/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

Who is online

Users browsing this forum: No registered users and 10 guests