Restore file backup
ps_restore_file_backup
Brings back an earlier version of a file from its backup.
TellMyShop Free: No. This tool is only in TellMyShop Pro. TellMyShop Free has only ready reports that read your store.
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 file (theme, module or, in the Service area, any shop file) from a backup (ID from ps_list_file_backups). Approval needs the switch of the area the file belongs to: Theme, Modules or Service. Before restoring it backs up the current version, so a restore can be undone too. If the backup comes from before the file existed (for example a new custom.css or a module template copied into the theme), restoring DELETES the file and brings back the state before it was created. 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. The switch of the restored file's area must be on (otherwise restore it in the module panel, File backups card, Pro only). Counts toward the file write limit (default 20 per hour), shared by all file tools (adjustable in the Settings: security, alerts, limits card).
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
- Module files ps_module_file
- Clear cache ps_clear_cache
Use cases with this tool
- Swap the homepage banner for a seasonal campaign
- Bring back the previous version of the shop's look after a bad change
- Change how an add-on behaves when changing its look is not enough
- Fix an error page after an update, with a developer's safety net
- Install or update an add-on from a ZIP file
- Fix a bug in an add-on's code until the author ships a fix
- Fix a shop file that blocks Google, with a backup
Last updated: 2026-10-11