Moving or Restoring Datastores on an Enkompass environment

There are a few scenarios that may require you to move an Enkompass Datastore or restore a failed Enkompass Datastore. There are a few options that are available, some are painful, some are nice and easy. I will walk through the steps below.

As you know an Enkompass installation is limited to a single datastore. This datastore is most comonly connected to a server and then shared using a UNC share or shared from a NAS device utilizing a UNC share. This UNC share CAN NOT CHANGE regardless if you are moving the data or restoring the data, so keep that in mind while creating your plan.

MOVING A DATASTORE:

  1. Have the new destination datastore connected to a server that has full access to your source datastore.
  2. It is very important to retain the permissions of the folder structure so for the move we will use Robocopy to move the data
  3. Where L: is the source and M: is the destination; Run the command: robocopy L: M: /MIR /COPYALL
  4. After the command is complete, verify the permissions on the folders by doing a random sampling on all folders in the datastore.
  5. Once you are satisfied that the copy of data is correct, you can proceed to the final step which is disconnecting the exisitng source datastore and then Share the new datastore. Dont forget to setup the share with the EXACT name as the existing datastore was shared.
  6. Set the share permissions with Full Control for these 5 groups: Everyone, cpadmin, AllUsersGroup, cPanelFtpAdmin, Domain Admins
  7. Enable Quota Management on the new datastore.
  8. I would suggest rebooting all servers after this is completed.

RESTORING A DATASTORE:

  • Have the new destination datastore connected to a server that has full access to your Enkompass domain.
  • Restore all your data from backup to the new Datastore.
  • Once you are satisfied that the copy of data is correct, you can proceed to the final steps below
  • Set the share to the EXACT name (UNC Share) as the existing datastore was named.
  • Set the share permissions with Full Control for these 5 groups: Everyone, cpadmin, AllUsersGroup, cPanelFtpAdmin, Domain Admins
  • Enable Quota Management on the new datastore.
  • At this point Enkompass will work, but you will have errors with all your existing sites. Create two test accounts, 1 reseller and 1 child acct of that reseller.
  • The painfull part is now going through and setting permissions on all your resored folders to match the settings of the accounts you just created.
  • I would suggest rebooting all servers after this is completed.

There are no Guarantees that this documented process will work for every Encompass environment, but it should work for most standard Enkompass setups. Hope this helps those who need it, I like to share what I know. 🙂

Continue Reading

Create Virtual Directory for an application in Enkompass

Many need the ability to create a Virtual Directory in IIS that will be persistant with the config pushes that Enkompass does.  This will be easy to accomplish when 2.2 releases but in the interim we have worked on a method to do this via the PostgreSQL backend database.  Please make sure you have a backup and use extreme caution when editing the PG database as it is a critical component of Enkompass.

Figure 1 & 2: Launch PG3Admin to log into Postgresql

VirtualApp0.jpgVirtualApp1.jpg

Figure 3 & 4: Drill down through Databases, apphostconfig, Schema, Public, Tables and find the Sites table. Use View Top 100 Rows from the View Data sub menu for each table example in this tutorial.

VirtualApp2.jpgVirtualApp3.jpg

Figure 5: Get the id [PK] integer for the site you wish to create the virtual directory and application for.  I am using my todd.tld domain as an example and therefore need the id[PK] integer 1. You can close this table view when you have the value.

VirtualApp4.jpg

Figure 6: Go to the application table and at the bottom on a new line add the name of the subdirectory to the second column (path character varying) and the id from Sites to the third column (site integer).  In my case I needed the subdirectory of /newapp and it was for site 1 so that is what I put in the respective columns.

VirtualApp5.jpg

Figure 7: Once you save a value will be generated for the first column; refresh and get that number for the next step.   The id [PK] integer in this table, 17 is what I will need for the next step.

VirtualApp6.jpg

VirtualApp7.jpg

Figure 8:  Now go to the virtualdirectory table: Again, scroll to the bottom for a new line to be visible and in the second Column 2 (application integer) you will enter the value generated after saving/refreshing from column 1 (id [PK] interger from the previous step) In my case this was 17. In Column 3 (virtualpath character varying) you will add a /, and in Column 4 (physicalpath character varying) you will add the full path to the folder. In my case it is c:UserscPaneltoddpublic_htmlnewapp.

VirtualApp8.jpg

VirtualApp9.jpg

Figure 9:  Once you save, you can trigger a configuration push or wait for the scheduled configuration re-publish. If the application is already setup in c:UserscPaneltoddpublic_htmlnewapp then it should start working immediately.

VirtualApp10.jpg

Continue Reading