FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14455 questions

17168 answers

28195 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
121 views 0 comments
by anonymous
Hi,

I am trying to script the creation of the user's defaults configuration backup on my fleet of RUT240's (~150). This is so I can restore my standard configuration via SMS when troubleshooting issues. FYI the user configuration backup is usually created via the gui by nagivating to system, backup, and clicking the create button under CREATE DEFAULT CONFIGURATION.

Two files look to be created in /etc/default-config when the user's defaults configuration is created.

1. config.tar.gz

2. config_date

I am creating the backup file using 'sysupgrade -b /etc/default-config/config.tar.gz', but I can't figure out how to populate the 'config_date' file. FYI the config_date file contains only the following string that matches the time and date in the attached image: 1660528958.

If I print this string to the file into that folder, it populates the Created date and time in the interface, and the backup becomes usable. Without it, it doesn't seem to be usable. It would be better if I could generate this string so it matches the actual date and time the backup was created rather than using the same old string for every backup.

Thanks for any help.

1 Answer

0 votes
by anonymous
I figured it out about 1 minute after posting...for reference it's a unix time string.

FYI the following creates the user's default configuration via CLI:

sysupgrade -b /etc/default-config/config.tar.gz

echo $(date +%s) | tee -a /etc/default-config/config_date
Best answer