11399 questions

13582 answers

21280 comments

31963 members

0 votes
85 views 4 comments
by
I wish to schedule an upgrade of a few RUTX11 devices at 3:00am.

Since this is not possible via RMS, I thought it should be a fairly easy task to set up.

- create a script that downloads the firmware to /tmp/firmware.img using curl and verifies its integrity

- run sysupgrade at the scheduled time

What I can't figure out is, should I be passing additional parameters to sysupgrade such as -c (preserve all changed files in /etc/) or -o (preserve all changed files in /)? As these devices are remote, I want to preserve their config as much as possible.

Anyone done this?
by

In case it helps anyone, the command I ended up using was:

sysupgrade -c -v /tmp/firmware.img

I put this inside a small wrapper script and used crontab to schedule it. The devices successfully updated in the middle of the night from RUTX_R_00.07.02.2 to RUTX_R_00.07.02.4. smiley

The config was preserved, but a couple of scripts I had in /root were erased (which is expected I guess). I don't know if there is a safer place to store any scripts so they will be preserved during sysupgrades. But that's not a major issue.

by
Put the name of the files you want to preserve in /etc/sysupgrade.conf
by
Thanks @flebourse that is very helpful !

1 Answer

0 votes
by
I notice, you did some homework :-)

To keep config, is a bit risky. In case of mayor upgrades, this will/might not work.

However, you might opt to save only your modified config values, to be re-applied: Upload them, upgrade, download and apply.
by
Thanks. I wrote some scripts and fingers crossed they will work. Will know by tomorrow morning!