Archiving Tenants on Live Servers

After a tenant is no longer needed on a live server, this process can be followed to deactivate it from routine server checks, hosting, etc but still keep the files in the repo for historical records or access if the tenant needs be reactivated at a future date.

Steps

Step 1

Complete a standard CMS process, documented here .

Step 2

Move as many tenants as desired from the active tenant folder at deploy-example/tenant to deploy-example/tenant-archive . You may need to create the archive folder.

Step 3

Commit and push this update to the repo. The steps below can be used for reference.

git add . git commit -m "notes" git push

Step 4

Run the cms sync-2 command only. This tells the production server not to take the update. We do this because we do not want to have to delete and recreate all those files on the server, so we are hiding the update from it using cms-sync-2 to tell it is up to date.

./foreground.sh example 00100 cms-sync-2

Step 5

During off hours on the server, log onto the live server and stop the server using the ./server stop command. More information can be found here .

Step 6

For each tenant that was archived, manually delete the folder for the tenant on the live server using this command, assuming you're in the root server folder:

rm -rfv deploy-example/tenants/oldTenant/

Step 7

Restart the server using the command ./server restart .