When creating a new site on the WP Cloud platform, clients can now set the new restore_from parameter to a pair of backup IDs (filesystem and database). This will provision a new empty site and then restore the provided backups to it.
For example:
curl -H "Auth: API_AUTH_TOKEN" -X POST \
--data "domain_name=restored-site.example.org" \
--data "admin_user=user" \
--data "admin_email=user@example.org" \
--data "restore_from[]=FS_BACKUP_ID" \
--data "restore_from[]=DB_BACKUP_ID" \
https://atomic-api.wordpress.com/api/v1.0/create-site/CLIENT/
This will create a new site with restored-site.example.org as its primary domain, and will restore the filesystem and database from FS_BACKUP_ID and DB_BACKUP_ID respectively. These backups must belong to the same site. Clients can use the site-backups-list endpoint to retrieve a list of available backups. The target domain (in our example, restored-site.example.org) must not exist on our system to prevent overwriting an existing site.
The restoration process may take some time, depending on the size of the backups. Once complete, the client will receive a webhook notification confirming that the site has been provisioned. At this point, the PHP version, space quota and other settings can be adjusted as needed.
The source site remains untouched. Similar to cloning, the restored site is a completely separate instance on the platform.