Restore¶
The restore feature allows you to apply saved setpoint values from a snapshot back to the control system.
When to Use Restore¶
Common use cases:
- Recovery - Return to a known good state after an issue
- Maintenance - Restore settings after maintenance work
- Testing - Reset to baseline between tests
- Rollback - Undo recent changes
Starting a Restore¶
- Open a snapshot's details page.
- To restore only some PVs, select them with the checkboxes. To restore the whole snapshot, select nothing.
- Click Restore.
Confirming the Restore¶
Squirrel asks you to confirm before writing anything. The dialog says how many setpoints will be written: Restore 3 selected setpoints? for a selection, or Restore all 1,250 setpoints? for the whole snapshot. It doesn't list the values; check them in the snapshot table before you click Restore.
Only PVs with a setpoint address and a saved setpoint value are restored. Readback-only PVs, and PVs whose setpoint was disconnected when the snapshot was taken, are skipped, and the dialog says how many. If none of the PVs has a saved setpoint, there is nothing to restore, and the dialog's Restore button is disabled.
Values are applied immediately
Clicking Restore in the dialog writes the saved setpoints to the control system straight away. There is no undo.
Following a Restore¶
A restore runs in the background, so you can keep using Squirrel, or leave the page, while it runs. A panel shows its progress. If restore hooks are configured, it shows one progress bar per stage: first the setpoints, then each hook's extra writes, such as magnet trims. (Currently the panel shows a single overall bar instead (#233).) While the panel is closed, a status chip in the sidebar shows the restore is running; click it to reopen the panel.
When the restore finishes, the panel says how many PVs were restored. Click Dismiss to close it.
Selecting PVs for Restore¶
Select All¶
Use the checkbox in the header row to select all PVs.
Select Individual PVs¶
Click the checkbox next to each PV you want to include.
Filter Then Select¶
- Use search or tag filters to narrow down the list
- Select the PVs you need
- Proceed with restore
Turn on Show selected to list only the PVs you've selected, to check them before restoring.
Partial Restore
You don't have to restore all PVs. Select only the ones you need to change. If you select nothing, the whole snapshot is restored.
Restore Hooks¶
Your facility may configure restore hooks: extra writes Squirrel makes during a restore, such as trimming a magnet after its setpoint is written. They run automatically, and show up as extra stages in the progress panel (once #233 is fixed). A PV whose hook write fails is reported as failed, under that hook's stage.
Restore hooks are set up by whoever runs Canopy; see Restore hooks in the Canopy documentation.
Safety Considerations¶
Production Systems
Restoring values affects the live control system. Ensure you have appropriate authorization before performing restores on production systems.
Best Practices¶
- Verify the snapshot - Make sure you're restoring from the correct snapshot
- Review the values - Check the saved setpoints in the snapshot table before restoring
- Start small - When uncertain, restore a few PVs first to verify behavior
- Communicate - Inform relevant operators before restoring values
- Document - Note why the restore was performed
Troubleshooting¶
Restore Failed¶
If a restore fails:
- Check network connectivity to the control system
- Verify the PVs are accessible
- Check for write permission issues
- Contact your system administrator
Partial Success¶
Some PVs may fail while others succeed. The progress panel then says how many failed: click View N Failed PVs to see each one, with its error and the stage it failed in. PVs that failed aren't retried automatically; select them and restore again once the problem is fixed.