subscribe to our Youtube


13308 questions

15799 answers


50172 members

0 votes
64 views 0 comments

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
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