MCNi Wiki : Restoring deleted Bombplates sites

Sometimes a band's site will be deleted erroneously. They might have paid us but their account was misconfigured such that bombplates.com doesn't know it, or an account manager might delete them by accident. Here's the process to restore the site if everything is straightforward

Key:

  • bandsY - the hosting server where the site existed before deletion
  • bandsZ - the hosting server where the site exists after recreation
  • SITE - the url of the site (e.g. someband.bombplates.com)
  • SIT - the database abbreviation of the site. Usually the first 8 letters of the url (e.g. someothe for someotherband.bombplates.com)
  • USER - whatever username is applicable in the context (e.g. your own unix username or a band site's mysql username)

log into bombplates.com (as an Account Manager or higher)

Go to Account Management.

Re-create the user - If you do not know a the user's actual details you can find them in various logs.

  • Starting Design - does not matter.
  • Band Member Username - is found in the database backup: root@10.1.1.51:/volume1/bombplates/bandsY/db/SIT_db/users.MYD
  • Band Member Email - is found in the same location
  • Band/Artist Name - database backup: root@10.1.1.51:/volume1/bombplates/bandsY/db/SIT_db/variables.MYD (as site_name)
  • Website URL - can be found in the account creation log: USER@bandsY.bombplates.com:/usr/bandsXTools/launch_command.log
  • Subdomain - can be found in the same place

Find the new user's integration KEY and host server number (Z) by editing the user's Integration page (user/UID/edit/Integration)

While you're there, update the user's billing info appropriately (user/UID/edit/Billing). All dates are stored as timestamps.

  • "Outstanding payments" is probably 1 or 2 if the site's been deleted
  • "Trial ends" - if the user's trial is over, the timestamp must end with 9. (9 itself is fine). If their trial hasn't expired, it must end with 0.
  • "Next Payment" is when their nex payment is considered past due. If they haven't entered payment info by then, the site will be deleted again.

Restore the user's data from FS3

$ ssh root@10.1.1.51
# cd /volume1/bombplates/bandsY
# /usr/syno/bin/rsync -avz --exclude=settings.php --exclude=manual_db.php sites/SITE/* util@utility01.bombplates.com:/var/www/html/sites/SITE/
# /usr/syno/bin/rsync -avz db/SIT_db/* util@bpdb01.bombplates.com:/home/util/tmp/SIT_db/
# exit
$ ssh MYACCOUNT@68.71.99.201
$ sudo su
# mv tmp/SIT_db/* /media/data/mysql/SIT_db/
# chown -R mysql:mysql /media/data/mysql/SIT_db
# chmod -R 770 /media/data/mysql/SIT_db
# service mysql restart

Restart MySQL if the site is not now displaying correctly.

$ ssh USER@bandsZ.bombplates.com
$ sudo /etc/init.d/mysqld restart
 
Log into SITE as administrator
 
Edit the band user (usually user/12/edit. If not, admin/user/user and click "edit" for the right user)
  • Verify that the username and email match what you entered when recreating the user. If not, update the user on bombplates.com
Update the integration KEY

https://SITE/pw/resync

Flush the cache