I updated my first RUTX11 to firmware 7.22. The first thing I always do is make a backup and compare it to the previous version to check for errors or settings drift.
In the backup.XXX.tar.gz file created by 7.22, the entire /etc/config directory is missing. I didn’t see anything about this in the release notes.
I managed to replicate the issue and forwarded it to our R&D team for further investigation. I will update you on the matter once I have more information.
Also on a RUTX50, there are even more files and subdirectories of /etc missing, along with /etc/config. A few examples, when compared to a backup taken in 07.21.3 ….
/etc/crontabs
/etc/openvpn
/etc/profiles
/etc/profiles.d
… and many more
I hope someone has given the dev-testers a kick up the ****, as backup integrity is vital to an organisation’s recovery plan.
And thank you for sharing that there are more missing files and directories from the backup. I have forwarded this information for our R&D team as it may be useful for further investigation.
I will post an update in this topic, once I have more information from our R&D team.
I also did a backup on a RUTX50 and compared the 7.22 version with a 7.21 version. The only difference I could find where the uhttpd cert files that moved from the /etc directory to the /etc/certificates directory. No missing directories.
That explained why I did not experience the problem. I do backups the “old-fashioned way”. I run an Ansible playbook using the /sbin/sysupgrade -b command.
- name: Get backup file name
ansible.builtin.shell:
cmd: set -o pipefail && echo "${HOSTNAME}|$(/sbin/uci get system.system.device_fw_version)|$(/bin/date +%F)|$(/bin/date +%T).tar.gz"
register: backup_name
changed_when: false
- name: Perform backup
ansible.builtin.command:
cmd: /sbin/sysupgrade -b "/tmp/{{ backup_name.stdout }}"
register: backup_result
changed_when: backup_result.rc == 0
notify: Copy backup to local machine
The change in the backup structure is intentional and reflects a transition to a universal backup system. Instead of multiple configuration directories and files, the configuration is now consolidated into a single file located at /tmp/configuration.json.
You can modify the required settings within this file and then apply the backup accordingly. This backup format will continue to be used in future firmware releases. By editing the configuration.json file, you can control which settings from the backup are applied.
I hope this clarifies the changes. If you have any additional questions, please do not hesitate to reach out.
I am still skeptical of the benefit of this “universal” monolithic JSON file vs the filesystem-adjacent method used previously.
The old system was very easy to store, modify, compress, compare, and validate. Now we have this huge mess of a JSON file which introduces novel ways to break the entire structure (stray comma, unescaped quote character, etc)
Also, as mentioned, it is an incomplete backup, missing certain things like crontab.
If this change is going to remain, I kindly request an API call to generate the “legacy” format backups.
@rvo that’s an interesting API for sure, but it’s hash-based. I just played around with it. It detects changed files, but you can’t diff the changes or see what they were. I had built up some tooling that relied on having access to the actual config file data. The integrity API isn’t a substitute for that.
To me it is more important to know that a file has changed than what the change is. I generate a baseline after each backup, and then run a validate just before the next backup. That way I get a confirmation nothing has changed that I do not know about. I don’t run a diff on my backup files.