How to restore on-premise data

Read time: ~5 minutes

Applies to: Admin Portal · On-premise only


What you can do

Restore your on-premise CRIBWISE data from a backup by copying the backed-up files back to their original locations. During this process, the Admin Portal services must be stopped.

Important: For cloud installations, backup and restore are handled by the service provider and cannot be performed by customers.


What gets restored

Data is stored across three types of storage. Restore all three to return the system to the state of the backup.

Storage What it holds What you restore
Relational database (MSSQL LocalDB) All structured relational data, including entities and their relationships The two SmartSupplyAdministration files in C:\Windows\System32\config\systemprofile
Table storage (MongoDB) Unstructured data, such as system events, events, and reporting data The Data folder in C:\MongoDB
File system All downloaded files and files prepared for download from the Admin Portal, such as item documents, and import/export files The contents of C:\Storage

Before you start

  • You need a backup to restore from — see How to back up on-premise data.
  • Sign in to the computer (server) hosting the application. Every step in this guide runs on that machine.
  • You need permission to stop and start Windows services on that machine.
  • Plan a maintenance window. The Admin Portal is unavailable while its services are stopped.

Warning: Restoring replaces the data currently on the server with the data in the backup. Anything recorded since the backup was taken is lost.

Note: To restore data from a backup, neither the Admin Portal service nor the MongoDB service can be running.


Quick start

Experienced administrators complete the restore in 5 steps:

  1. Stop the CD.Platform and MongoDB services.
  2. Replace the two SmartSupplyAdministration database files with the ones from the backup.
  3. Replace the Data folder in C:\MongoDB with the one from the backup.
  4. Replace the contents of C:\Storage with the file system backup.
  5. Start the MongoDB and CD Platform services again.

Need more detail? Follow the full steps below.


Steps

Step 1 – Stop the Admin Portal service

To stop the CD.Platform service, follow these steps:

  1. Press Windows + R on your keyboard to open the Run dialog.
  2. Type services.msc and press Enter.
  3. In the Services window, scroll down the list to find CD.Platform. Services are listed alphabetically, so it should appear under the “C” section.
  4. Right-click on CD.Platform.
  5. Select Stop from the context menu (1).

The Status column for CD.Platform should now be blank (instead of showing “Running”).

The Services tab of Task Manager with CD Platform Host right-clicked and Stop highlighted in the context menu

Stopping the service. The Services tab of Task Manager, shown here, is an alternative to the Services window.

Step 2 – Restore the MSSQL LocalDB database

  1. Navigate to C:\Windows\System32\config\systemprofile.
  2. Replace the files SmartSupplyAdministration.mdf and SmartSupplyAdministration_log.ldf with the same files from the backup location.

Start the CD Platform services, or continue with the restore of MongoDB.

Step 3 – Restore MongoDB

  1. Shut down the MongoDB service (open Task Manager, locate the MongoDB service, and stop it).
  2. Navigate to C:\MongoDB and delete the Data folder.
  3. Copy the Data folder from the backup location into C:\MongoDB.
  4. Restart the MongoDB service (and the CD Platform services, if they are still stopped).

The Services tab of Task Manager with MongoDB right-clicked and Stop highlighted in the context menu, while CD Platform Host above it already shows Stopped

Stopping MongoDB from Task Manager. CD Platform Host is already Stopped from Step 1.

Tip: Alternatively, mongorestore can be used to import data dumped with mongodump without need to stop MongoDB services. To restore dumped data, start C:\MongoDB\Server\bin\mongorestore.exe. For more information, visit the MongoDB backup documentation.

Step 4 – Restore the file system

To restore files stored on the file system, it is recommended to stop the CD Platform services to prevent any data corruption.

  1. (Optional) Stop the CD Platform services.
  2. Clear the contents of the folder: C:\Storage.
  3. Copy the contents from the file system backup folder to C:\Storage.
  4. (Optional) Restart the CD Platform services.

Success: The MongoDB and CD Platform services are running again, and the Admin Portal opens showing the data as it was when the backup was taken.


Next steps

  1. Take a fresh backup — once the restored system is verified, follow How to back up on-premise data again so you have a current recovery point.
  2. Continue the update — if the restore followed a failed upgrade, retry it with How to update the on-premise Admin Portal.

Troubleshooting

Problem Likely cause Fix
You cannot find CD.Platform in the Services window The list is long and scrolled past the entry Services are listed alphabetically — scroll to the “C” section
A .mdf or .ldf file cannot be replaced because it is in use The CD.Platform service is still running and holds the database files Stop CD.Platform as described in Step 1, then replace the files
The Data folder in C:\MongoDB cannot be deleted The MongoDB service is still running Shut down the MongoDB service first (Step 3), then delete the folder
You cannot clear C:\Storage The CD Platform services are still running and holding the files Stop the CD Platform services, then clear the folder (Step 4)
The Admin Portal shows data from before the backup, or no data at all Only part of the restore completed — the three storage types are restored separately Restore all three: the database files (Step 2), the MongoDB Data folder (Step 3), and C:\Storage (Step 4)
You cannot find these services or folders on your machine You are on a cloud installation, not an on-premise one Backup and restore are handled by the service provider and cannot be performed by customers

Was this article helpful?

Related Articles