Update the router firmware using command line interface

His there away to update the routers firmware using the command line interface?

"sysupgrade" is the command.
You need to first download the firmware file to the router's disk, e.g. to /tmp ramdisk.

 OpenWrt SNAPSHOT, r5740-012d20eebe
 -----------------------------------------------------

root@LEDE:~# sysupgrade
Usage: /sbin/sysupgrade [<upgrade-option>...] <image file or URL>
       /sbin/sysupgrade [-q] [-i] <backup-command> <file>

Thanks. The command sysupgrade backup -b doesn't work.

I get this error Image metadata not found
Use sysupgrade -F to override this check when downgrading or flashing to vendor firmware
Image check 'fwtool_check_image' failed.

Most manufacturer firmware files need to be modified to make them suitable for flashing with sysupgrade. If you are flashing an OpenWrt sysupgrade file, use either no options, or -n to not save configuration.