Compare running configuration with backup?

Hi,
is is possible to compare a running configuration on a RUT955/956 with a backup that i created month ago and see if something changed? The RUT955 has the same firmware version as the backup.

Best regards

Hello,

You can download a new backup file and compare the configuration files. If you are using a Windows machine, I would suggest using a WinMerge application. The application will highlight the differences between the files.

Kind Regards,

I restored a backup on a router. I changed nothing in the configuration and downloaded a new backup file. I then compared it with the WinMerge. However, there were differences in the files as shown in the screenshot.

When i look into the files only the arrangement of the parameters is different, but I want to write an automated comparison using a script. Is there another possibility or do you have another idea?

Hello,

If you want to write a script and compare configurations, one of the options would be to use UCI export and ‘diff’ utilities:

# export uci config to a file
uci export > /tmp/config1.txt
# if on the router, download diffutils:
opkg update
opkg install diffutils
# assuming the 2nd config is uploaded to the router (or use another linux machine)
diff /tmp/config1.txt /tmp/config2.txt
# diff help
diff --help

For example, when only the SSIDs are different:

image

Kind Regards,

What is the difference between the uci config and the backup file? Are all configurations (VPN, interfaces, wifi, firewall, user management, cloud configs, etc.) represented by the uci export function?

Another question. Can I configure the router via “uci import” in the same way as the backup file?

Thanks in advance

Hello,

UCI is basically a comprehensive system for configuring various aspects of the router through a unified interface. You can find more information here.

You can use uci import. However, similarly to backup files, it is important that the devices are running the same firmware version and have the same product code. Since difference devices and firmware versions can have many differences, importing configurations from a different device will likely cause issues. In such cases, you will likely need to restore the device to factory defaults to regain access.

Kind Regards,

This topic was automatically closed after 15 days. New replies are no longer allowed.