Have read over #898800: Allow restore of deleted site but it does not provide clear assistance on how to restore a previously deleted site from the backup tar ball.

Looking for help and guidance on how to accomplish this via the Aegir Instance or via drush.

Thank you.

Comments

snlnz’s picture

If the site is already deleted, just use:
drush sa | grep platform
will get the platform aliases.

Then run this to set up the site in the platform
drush provision-save @SITENAME.COM --context_type=site --platform=@PLATFORM_ALIAS --uri=SITENAME.COM --db_server=@server_localhost --client_name=admin

and then restore archive file to that site:
drush @SITENAME provision-deploy /data/disk/o1/backups/tar-archive-backup-file.tar.gz

HyperGlide’s picture

@snlnz

Thanks.

Was able to get the platform alias.

When I execute
drush provision-save @SITENAME.COM --context_type=site --platform=@PLATFORM_ALIAS --uri=SITENAME.COM --db_server=@server_localhost --client_name=admin

I get:
Could not find provision alias named: @server_localhost

How can i confirm the db_server's name?

Thank you.

HyperGlide’s picture

Status: Active » Closed (works as designed)

Got it resolved.

db_server @server_master

HyperGlide’s picture

Issue summary: View changes

Properly link issue.

wickwood’s picture

Version: » 6.x-2.0-rc24
Issue summary: View changes
Status: Closed (works as designed) » Active

None of what is listed above here is working for me and/or makes any sense.

I have a backup of the site in ~/backups and the platform still exists, but I don't know how to recover it.

Yes, I completely deleted the site. My client and I are going our separate ways, but I realized after downloading the backups and deleting the site, that I should have changed the User 1 email address and password.

I would appreciate it if someone can either point me to some place where the steps to recovering the site or provide them here.

Thanks for your help in advance!
Steve

P.S. Also, I'm reopening this issue because it seems like the best place to continue this conversation.

wickwood’s picture

Status: Active » Closed (works as designed)

I'm not entirely sure all of this is best practice or not, but I was able to restore my site by following some of the steps in: https://omega8.cc/import-your-sites-to-aegir-in-8-easy-steps-109

Here is what I did:

  1. Since the platform still existed where site previously existed, I just recreated the site from the Aegir Add Sites (/node/add/site).
  2. From my local machine scp -r the /files, /modules, /themes directories
  3. Example $ scp -r files o1.ftp:/path/to/platform/sites/www.mydomain.com/

  4. Also uploaded via scp database-dump.sql o1.ftp:/path/to/platform/sites/www.mydomain.com/
  5. Note that I had to temporarily chmod g+w /path/to/platform/sites/www.mydomain.com/ in order to do this. I probably should have put it in the files directory.

  6. Ran drush sqlc < database-dump.sql from /path/to/platform/sites/www.mydomain.com/
  7. Ran drush dis captcha so I could login
  8. Logged in and cleared all caches from /admin/settings/performance

Hope this helps someone else and if there is anything I could have done better I would appreciate learning about it.

All the Best,
Steve