RUT95X : how to create default configuration with cli

Hello,

I use RUT955 and RUT956. I’m looking for a way to create a default configuration with CLI:
image

I try with

# Generate backup :
umask go=
sysupgrade -b /tmp/backup-${HOSTNAME}-$(date +%F).tar.gz
ls /tmp/backup-*.tar.gz
 
# Restore backup
ls /tmp/backup-*.tar.gz
sysupgrade -r /tmp/backup-*.tar.gz
reboot

But this back-up is not visible in the web interface.

Thanks for your support.

Hello,

By default, files for the “Create default configuration” feature are saved in the directory /overlay/upper/etc/default-config. This file is exclusively used in the WebUI and serves as the default configuration for restoration. You can easily identify it when an additional option appears under “Restore default settings” after it has been created.

2024-03-25-10-01-11-RUTX12 - Teltonika Networks — Mozilla Firefox

When you use sysupgrade, backups are created which can only be utilized through the “Restore configuration” section or sysupgrade.

Best regards,

Marijus

thanks for your answer !

I just try. that means it’s not possible to use CLI to create a default configuration that can be used by pressing reset button during 6 to 11 seconds ?
thanks for your support

Hello,

Yes, it is possible. You can create it using this SSH/CLI command:

api Post /backup/actions/create_default

Best regards,

Marijus

thanks for this answer, that what I was looking for.
Do you know if I can do the same by using uci command ?

thanks

Hello,

There is no UCI command for this. What is your intended use for this command, maybe we can find an alternative for it?

Best regards,

Marijus

hello, today I just use uci commands to configure all my RUT and I was looking for a way to configure the user default recovery.
but the API seems to answer my need (I didn’t know https://developers.teltonika-networks.com/, is it new ?).

Do you recommand to use the API to configure the RUT instead of uci commands ?

thanks for your support

Hello,

Yes, the API is relatively new and its implementation is expected to increase.

Similar to UCI, API is just another command within RUTOS.

I can’t recommend one over the other. UCI has been used for a longer time and is more familiar to most, but API is becoming more powerful and easily translates to external API usage. You can find more information about it, as you may have already noticed, here: link to developers.teltonika-networks.com

Best regards,

Marijus

This topic was automatically closed 40 hours after the last reply. New replies are no longer allowed.