[Solved] Uploading partial configuration?

Is it possible to edit a backup archive so that it will only "add to" the configuration on the device?

What I had in mind was download a configuration, remove some of the files, compress it again, and then upload the edited archive to another running system so that it only replaces the files that are present in both the backup archive and the running system. Are there any files or directories that are required to be present for the archive to be considered valid?

I don't see why that wouldn't work. The tar tree is merely a copy of selected parts of the router's directory tree starting at root. Files that are in the tar would be written to the router, being created if they don't exist or overwriting existing files with the same name and path. Other files that are already on the router and not in the backup would be left in place.

2 Likes

Cool! It seems to be working. Going one step further, would it be possible to simply append the contents of these files to the existing files, if we know that the configuration does not conflict?

You can basically keep only custom settings and merge them with UCI and shell over SSH.
Someone may prefer this way over traditional backup as it helps to minimize risks of possible configuration changes during upgrades.

1 Like

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