NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
demonic1
Dec 28, 2016Star
Status:
Engineering Investigation
Never rebuild a configuration from scratch again!
I understand that a developing product needs updates. Sometimes these updates require changes to what data is expected for an element of the settings config. As a customer, when a firmware update i...
DougB628
Apr 16, 2019Apprentice
Here's a couple of my scripts - this first one dumps the settings I want to save:
config show > config.txt
grep reservation[1-999] config.txt > reservations.txt
grep orbi_dev_name[1-999] config.txt > device_names.txt
grep orbi_dev_name_ntgr[1-999] config.txt > device_models_types.txt
grep access_control[1-999] config.txt > access_control.txt
grep -E "^wl_ssid|^wla_ssid|wlg1_ssid|^wla1_ssid" config.txt > othersettings.txt
grep -E "^netbiosname|^wan_hostname|^Device_name" config.txt > othersettings.txt
grep email_ config.txt >> othersettings.txt
grep ^log_ config.txt >> othersettings.txt
grep time_zone config.txt >> othersettings.txt
grep upnp_enable config.txt >> othersettings.txt
Next, the script that uses the text files generated by the above script to create a new script to restore the config:
#!/bin/sh
sed -E -e 's/(.*)=(.*)/config set \1=\"\2\"/' reservations.txt > set_reservations.txt
sed -E -e 's/(.*)=(.*)/config set \1=\"\2\"/' device_names.txt > set_device_names.txt
sed -E -e 's/(.*)=(.*)/config set \1=\"\2\"/' device_models_types.txt > set_device_models_types.txt
sed -E -e 's/(.*)=(.*)/config set \1=\"\2\"/' access_control.txt > set_access_control.txt
sed -E -e 's/(.*)=(.*)/config set \1=\"\2\"/' othersettings.txt > set_othersettings.txt
cat set_othersettings.txt > set_config.sh
cat set_device_names.txt >> set_config.sh
cat set_device_models_types.txt >> set_config.sh
cat set_access_control.txt >> set_config.sh
cat set_reservations.txt >> set_config.sh
chmod +x set_config.sh
I agree with you that there's a ton that could be done from here.