Currently, to my knowledge, deleted sites can not be restored. The only way I am personally aware of is to do the following:

1. Create a new site.
2. Make a manual backup of new site.
3. Copy a backup file from the deleted site over the manual backup of the new site.
4. Restore from the overwritten manual backup.

This process isn't exactly intuitive.

The proposed solution (in my mind) would be to allow for a restore task to be actioned directly on the deleted site itself.

Comments

Deciphered’s picture

So i have begun this issue, firstly by allowing the 'restore' task to be triggered on a 'Deleted' site, which was easy enough in itself.

However, when triggering a restore task on a deleted site the following error is encountered: Could not find a Drupal settings.php file at ./sites/default/settings.php.

This can be seen by installing the Hosting Site Backup Manager module and browsing to the Backups page of a deleted site (if it has a backup) and running the restore task.

From what I can tell, the major issue here is that the provision side of things both tries to bootstrap and connect to the database prior to running the restore task, which is not possible given that there is no codebase/database for a deleted site.

I suspect that instead of using the 'restore' task, the/a 'deploy' task will need to be used instead.

Deciphered’s picture

Status: Active » Needs work

Ok, proof of concept time, this is using the 'restore' task, even though it probably doesn't need to/shouldn't be, but it does work... with at least one issue (you need to run the task twice as the first time the site context isn't passed) that does need to be fixed and a few additional safety checks.

Hosting: http://drupalcode.org/sandbox/deciphered/2001932.git/shortlog/refs/heads...
Patch: http://drupalcode.org/sandbox/deciphered/2001932.git/patch/f0395d7889bbc...

Provision: http://drupalcode.org/sandbox/deciphered/2005700.git/shortlog/refs/heads...
Patch: http://drupalcode.org/sandbox/deciphered/2005700.git/patch/8c5adf38c4ab5...

ergonlogic’s picture

Note that I closed #898800: Allow restore of deleted site as a duplicate, since there's code over here. The discussion is worth noting though.

ergonlogic’s picture

Version: 6.x-2.x-dev » 7.x-3.x-dev
Issue summary: View changes
Status: Needs work » Postponed

Feature requests should be against 7.x-3.x. Marking as postponed, since I don't believe anyone is working on this at the moment.