Recovering Winbox

 

Related Docs:   Recreating Unix-Hosted Servers Recovering Winbox Quota

This document explains how to restore H-Sphere winbox configuration using the Physical Creator utility. If you have access to user homes, you can recover user content from this directory. If you don't, you'll need an earlier backup with preserved directory structure.

 

Step 1. Back Up User Content

  1. Stop IIS by running the following commands from the command prompt:
    iisreset /stop
    net stop w3svc
    net stop ftp
  2. Rename the directory containing H-Sphere user homes. It will be used later to recover user content. If you don't have access to user homes, you'll have to recover user content from a backup.
  3. Start IIS:
    iisreset /start
  4. Create an empty HSHOME directory

 

Step 2. Install H-Sphere on the WinBox

  1. Make sure to have IIS (WebService) and FTP (IIS or Serv-U) installed.
    For information on IIS, run from the command prompt:
    %SystemRoot%\System32\Inetsrv\iis.msc
    For information on Serv-U FTP, check the task manager or Service Managere (full name : Serv-U FTP Server, short name: servu)
    FTP can be missing if the server is running only MS SQL.
  2. Follow Winbox preinstallation procedure as suggested in the WinBox Pre-Installation Guide.
  3. After the installation, set up WebShell3 or WebShell4 depending on the version of H-Sphere (2.3.2 or 2.4).

 

Step 3. Set up dedicated IPs

  1. Go to the H-Sphere admin control panel and select the Winbox in L.Servers of the E.Manager menu.
  2. Copy all Busy Dedicated IPs and their netmasks from the list of IPs into a text file the IPs to create a file with the following format:
        192.0.34.166   255.255.255.0
        160.79.224.130 255.255.255.0
        81.3.94.100    255.255.255.0
    
  3. Bind IPs using the IpCreator utility, passing the file with IPs as a parameter:
    IpCreator.exe FILE_WITH_IPS > log.txt

 

Step 4. Prepare Target Winbox for Physical Creator

  1. In the command prompt of the Winbox server, run:
    net stop HsQuotas
  2. Remove the content of the HSphere\skeleton directory.
  3. Run skeleton_empty.exe with the '-dir'parameter:
    skeleton_empty.exe -dir

 

Step 5. Run PhysicalCreator on the CP box

  1. Go to the H-Sphere admin control panel, select P.Servers of the E.Manager menu, and click server info for the Winbox in question.
  2. Check if server info shows on the page that appears. If not, the CP server can't communicate with the Winbox; make sure to fix this issue before proceeding.
  3. Run PhysicalCreator as the cpanel user:
    java -Xms64M -Xmx512M psoft.hsphere.tools.PhysicalCreator -rg winweb -co -lid LOGICAL_SERVER_ID > creator.log 2>&1 &
    More on PhysicalCreator
  4. In the command line on the Winbox, run tail -f action.log to monitor the creation of Winbox resources.
  5. In another command line window, periodically check the number of created domains by running:
    find "CreateWebHost(" <HS_DIRECTORY>\logs\action.log /c
    for example:
    find "CreateWebHost(" d:\hsphere\logs\action.log /c

 

Step 6. Restore content from backup

  1. Back up IIS metabase using built-in IIS backup tools.
  2. Stop IIS:
    iisreset /stop
    net stop w3svc
    net stop ftp
  3. Copy user content to the directory for user homes.
  4. Start IIS:
    iisreset /start
  5. In the command prompt of the Winbox server, run:
    net start HsQuotas

 

Step 7. Install shared SSL

  1. In the admin control panel, install completely new Certificate key and file pair You can get them in /hsphere/shared/apache/conf/ssl.shared/[domain.name]/ on any Unix/Linux web server. This will repost the wildcard certificate on all servers, including the Winbox you are recovering.
  2. Copy results of the query into a text file in the recreation_scripts directory and name it, for instance, S_SSL.txt. It will have the following format:
    sname1 | hostnum1 | domain_name1
    sname2 | hostnum2 | domain_name2
    ...
    snameN | hostnumN | domain_nameN

    where:
    snameX - is the third level domain secured with the wildcard certificate, e.g. user22.yourdomain.com
    hostnumX - is the domain ID in IIS
    domain_nameX - is the corresponding second level domain, e.g. user22.com.
  3. Enter the recreation_scripts directory and run the following command:
    sslprepare.bat %1 %2 %3 %4 %5� > SetSSL.txt
    where:
    rem %1 - is the file name you have created (e.g. S_SSL.txt)
    rem %2 - Winbox IP
    rem %3 - Service domain used for shared SSL
    rem %4 - H-Sphere login used at Winbox installation
    rem %5 - H-Sphere password used at Winbox installation.
  4. Open SetSSL.txt and remove the first part leaving only the list of links.
  5. Run the following command:
    WGET.EXE -i SetSSL.txt
    This will recreate all Shared SSL resources on the Winbox.

 

Step 8. Set correct NTFS permissions and Owner for the Home directory

For IIS FTP:

  1. Run it to set correct owner and NTFS permissions on user home directories:
    setscrt [-owner] [-ntfs] > setscrt.log
    You can run setscrt with the -owner option, then with the -ntfs option to break the process in two:
    setscrt -owner > setscrt_owner.log
    setscrt -ntfs > setscrt_ntfs.log
  2. Check the log files for report.

Note: The following permissions are set on each specific customer directory:

Group NTFS Permissions
Administrators
System
Full
User account Modify
Read & Execute
List folder
Read
Write

For SERV-U FTP:

Group NTFS Permissions
Administrators
System
Full
IUSR_ account Modify
Read & Execute
List folder
Read
Write

 

Step 9. Reinstall ASP.NET for all accounts that have it enabled in the CP

On this step, we will use scripts in the recreation_scripts directory.

  1. Copy results of the query into a text file in the recreation_scripts directory and name it, for instance, aspnet.txt.
  2. Enter the recreation_scripts directory and run the following command:
    aspnetprepare.bat %1 %2 %3 %4 > aspnet_links.txt
    where:
    rem %1 - file name, e.g. aspnet.txt
    rem %2 - Winbox IP
    rem %3 - H-Sphere login used at Winbox installation
    rem %4 - H-Sphere password used at Winbox installation.
  3. Open aspnet_links.txt and remove the first part leaving only the list of links.
  4. Run the following command:
    WGET.EXE -i aspnet_links.txt
    This will recreate all ASP.NET resources on the Winbox.

 

Step 10. Reactivate MS SQL for all accounts that have it enabled in the CP

Skip this step if you are using H-Sphere 2.4 or later. On this step, we will use scripts in the recreation_scripts directory.

  1. Copy results of the query into a text file in the recreation_scripts directory and name it, for instance, mssql.txt.
  2. Enter the recreation_scripts directory and run the following command:
    mssql.bat %1 %2 %3 %4 > mssql_links.txt
    where:
    rem %1 - file name, e.g. mssql.txt
    rem %2 - Winbox IP
    rem %3 - H-Sphere login used at Winbox installation
    rem %4 - H-Sphere password used at Winbox installation.
  3. Open mssql_links.txt and remove the first part leaving only the list of links.
  4. Run the following command:
    WGET.EXE -i mssql_links.txt
    This will reactivate the MS SQL resource.

Related Docs:   Recreating Unix-Hosted Servers Recovering Winbox Quota



Home   Products   Services   News
© Copyright. . PSOFT. All Rights Reserved. Terms | Site Map