Restore a site backup
restore_backup
Replaces the entire current content of a site with the content of an earlier backup.
Every page, component and setting the site holds today is overwritten, and any work done since that backup was taken is dropped. The tool tells the client to confirm with you which backup you mean, and to say plainly what you will lose, before calling it.
The one safety net is that Modulify first takes a Pre-restore Backup of the current state, typed automatic, so restoring the wrong backup can itself be undone by restoring that one. A restore does not bring back stored files, database rows, environment variables or the site's source files, and the live site keeps serving its last published version until you publish again.
A restore never changes which GitHub repository holds the site code, the site's custom domains or a domain verification in progress. It is refused, with the same message send_message and publish_site give, while the site code is being moved into GitHub, when Modulify has lost access to the GitHub repository that holds the site or that repository was deleted, and when the code lives in the workspace's own GitHub but the workspace is on the Free plan. See Move your code to GitHub.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
projectId |
string | Yes | The site to restore into. |
backupId |
string | Yes | The backup to restore, from list_backups. Either its _id or its BackupId works. |