PDM Archive Management and Relocation – Part 1 – Cleanup

SOLIDWORKS PDM Tech Tip

Written by: Bryce Hooper, Application Engineer @ DASI Solutions

 

It’s always hard to judge just how much data you will need as time goes forward. What is reasonable today isn’t always enough tomorrow. As we create CAD data and dig into our PDM vault, the rate of growth is likely to increase. This doesn’t bode well for our server hard drives. We have a few options with what we can do to address this. Some of these have limited effect as the data we have is often precious and cannot be spared.

So, as you read this series of articles, be reminded that the best solution to increased data will be to add more space in one form or another.

The methods that we will go into are as follows:

  • Cleanup – Removing already deleted files permanently
  • Distribution – Relocate the archive to a different disk (partial or full)
  • Compression – Reduce the size of older versions on the archive
  • Cold Storage Schemas – Delete older versions automatically

 

Cleanup

Cleaning up a vault is a task that is actually done on a regular basis without any action. However, we can take some additional actions to speed this process up and even add to the garbage that gets taken out by the cleaner service. This cleaner service normally removes destroyed and orphaned files from the archive. When files are destroyed by a user or by emptying the recycle bin, only the database records are purged. Then, later the cleaner service will scan the archive and remove these files that no longer have records.

Cleaner Service

By default, the cleaner service will run nightly at 3:00 AM. However, this behavior can be overwritten to run on a different schedule. To do such, create a new string registry value called CleanerSchedule at the following location.

 HKEY_LOCAL_MACHINE\SOFTWARE\SolidWorks\Applications\PDMWorks Enterprise\ArchiveServer\Vaults\[Vault Name]

 

The value of the string can be the word “off” to disable the cleanup operation in the specified vault, or it can be constructed of three sections – Minute, Hour, Weekday. It is built as such:

  • Minute – 0 through 59 (0 minutes past the hour)
  • Hour – 0 through 23 (0 is midnight)
  • Weekday – 1 through 7 (1 is Monday)

The sections can contain a single number (1), a range (1-7), or a list of numbers (0,15,30,45). Sections are delimited by a single space. A wildcard can be used by placing an asterisk (*) in a section.

Some examples of schedules:

  • 0 0 * – Every midnight
  • 0 0 1-5 – Every weekday at midnight
  • 0 * * – Every hour, every day
  • 0,15,30,45 * 1-5 Every 15 minutes, every weekday

After any change to the cleaner values, restart the Archive Server Service to put it into effect.

Destroying Deleted Files

Deleted files often build up in the background without anyone realizing it. These files still exist in the database and in the archive and so continue to take up space. It is advised to periodically “take the trash out” by destroying previously deleted files. How often this is done is dependent on how often disk space could become an issue and how many deleted files are created over time.

To access the list of deleted files, right click in the white space of a folder and go to Properties. In the properties dialog there will be several tabs. For this exercise we are concerned about the “Deleted Items” tab. On this tab we will see a list of files that have been deleted with information as to by whom and when they were deleted. Additionally, the size and location are also listed. This is important if the goal is simply to clear space on the drive. Destroying the largest files first would of course yield the fastest result in this case.

Destroying Deleted Files

This action can be done in any folder, though it may be best suited to do this from the root of the vault. From here, the option to “Include items in sub-folders” can be selected to see all files deleted through the entire vault.

Provided that the permission to destroy has been granted, any file can be right clicked to get the option to destroy or restore. In this case, destroying is the goal. Once this is selected, there will be one final prompt before the file is permanently removed from the database. As detailed above, the actual files will be removed once the cleaner service runs and so the results will not be seen until then.

 

Disclaimer

Before taking any steps to relocate, remove or compress data, please ensure that all files have been checked in by the users, backups have been taken of both the database and archives. In the event of a relocation, have all users log off or go into Offline Mode before attempting the move.

 

DASI Solutions

DASI Solutions

DASI Solutions is dedicated to service and support. As one of a handful of original, charter value-added resellers (VAR) in the SolidWorks Community, DASI Solutions has built partnerships and success stories with many of our customers. We are very pleased to bring you SolidWorks 3D CAD design engineering software and 3D printing services.
DASI Solutions
DASI Solutions