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.
Updated by Marcin Kuzminski [CTO] about 4 years ago
- Target version set to Current Work
Yes this is a good idea, i like that it would much simplify backup/restore and NIX store cleanup.
Updated by Catalin Salgau about 4 years 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.