Per documentation, restoring an instance involves creating a new instance and replacing files.
Assuming one is restoring their entire ~/.rccontrol folder, the issue, as I see it, comes down to not having the required files expanded under the NIX store, as symlinked from instancename/profile.
I'd like to suggest an rccontrol extract command that downloads (if not in cache/offline) and extracts the proper files on restore/upgrade, without the intermediary new instance step.
This would also simplify cleanup of the nix store on live instances.
#2 Updated by Catalin Salgau 8 months ago
This came to mind randomly - a function like this should not (by default or as an option) blindly trust existing symlinks links under /cache/.
As it stands, attempting to install an instance(with a symlink in cache for that version) or running an upgrade(having a profile symlink) will crash (this should probably be checked for and handled).
For the use case above, removing the NIX store and (after reinstallin rccontrol) trying to install an instance without removing cache symlinks will make crash.