Restore file backup
ps_restore_file_backup
Write · preview + approveBlock 3 · Appearance & deployments (service connector, off by default)Service connector onlyBlock off after install
Brings back an earlier version of a look file.
Ask Claude
„The product page looks broken since your last change. Restore the previous version.”
Example preview
Restore backup 41 to templates/catalog/_partials/product-prices.tpl (2026-10-03 11:20). - <p class="free-delivery">...</p> The current version will be backed up first.
Technical details
Restores a theme file from a backup (ID from ps_list_file_backups). Before restoring it backs up the current version, so a restore can be undone too. If the backup comes from before the file existed, restoring writes an empty file. The preview shows the differences.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| backup_id | integer | yes | Backup ID. |
| confirm | boolean | no | false (default) returns a preview and saves nothing. true executes, only after the user approved the preview, together with change_token. |
| change_token | string | when: confirm=true | Token from the preview. Required with confirm=true. Valid 30 minutes, single use, bound to the previewed arguments and data state. |
Limits
One file per call. Counts toward the 20 theme writes per hour.
What you see before anything is saved
Claude first calls the tool without confirming it. The module returns a preview (current and new values) and a single-use token valid for 30 minutes. Claude shows you the preview and saves the change only after your yes.
Related tools
- List file backups ps_list_file_backups
- Write theme file ps_write_theme_file
- Clear cache ps_clear_cache
Last updated: 2026-10-03