Trimech-Main-Site-Group-Navigation Trimech-Main-Site-Group-Navigation Trimech-Main-Site-Group-Navigation Solid-Solutions-Group-Navigation Javelin-Group-Navigation Solid-Print-Group-Navigation 3DPRINTUK-Group-Navigation Trimech-Enterprise-Solutions-Group-Navigation Trimech-Enterprise-Solutions-Group-Navigation Trimech-Advanced-Manufacturing-Group-Navigation Trimech-Staffing-Solutions-Group-Navigation
With over 35 years of experience, the TriMech Group offers a comprehensive range of design, engineering, staffing and manufacturing solutions backed by experience and expertise that is unrivalled in the industry. The TriMech Group's solutions are delivered by the divisions and brands shown here, use the links above to visit the group's websites and learn more.
x
Search

Standard Procedure: How to Backup your Data in SOLIDWORKS PDM Standard

Friday December 27, 2024 at 8:00am

Modern servers tend to have a great deal of resilience built into them to reduce the risk of data loss.

However, in the unlikely event of database corruption or complete hardware failure, it is your responsibility to ensure that you have a disaster recovery plan in place should you need to restore your PDM Vault and recreate it from a backup onto replacement hardware.

CONTENTS

  1. Key Components of SOLIDWORKS PDM
  2. Backing up your Archive Server settings
  3. Backing up your Archives
  4. Backing up the Database(s)

Key Components of SOLIDWORKS PDM

SOLIDWORKS PDM Standard comprises two key components:

  • The Vault Database containing the vault definition, metadata, references and the history of all files.
  • The Archive contains all the files managed by SOLIDWORKS PDM as well as their previous versions.

When considering a disaster recovery plan, you should be backing up the Archive Server settings, the Archives and the Vault Database(s) and, unless you have a specific SQL Agent for your Backup solution it is likely you will need to manually create those SQL Backups locally first before backing up externally along with the Archive folders / settings also being backed up at the same time.

Gain the latest industry insights and learn new shortcuts to success with our free webinars.
Register Here

Backing up your Archive Server Settings

This is important as it contains the user details for accessing the Vault plus all the registry keys you would need to migrate / restore the Vault onto new hardware. This is simple to schedule via the Archive Server Configuration Tool.

Under Tools select ‘Backup Settings’, then specify the options required (The Vaults whose settings you want to backup, location of the Backup, schedule for the backup and optionally a password on that backup).

Backing up the Archives

This is a case of using your standard Backup Tool to create a complete copy of all the files within the Vault. The default location for the Archives is in a ‘Data’ Folder under the SOLIDWORKS PDM ‘Program files’ location.

In there you should see a Folder named as per your Vault, which contains 16 folders named 0-9, A-F. This is the Archive for your Vault. It is possible however to change this location when the software is installed.

If you are unsure where the Archive folders are stored, the following Registry key will list the location for each of the 16 folders for the listed Vault.

HKEY_LOCAL_MACHINE\SOFTWARE\SOLIDWORKS\Applications\PDMWorks Enterprise\ArchiveServer\Vaults\[vaultname]\ArchiveTable

Backing up the Database(s)

Whilst SQL Standard/Enterprise editions come with built-in tools to schedule backups and other maintenance tasks within the SQL Management Studio application, this isn’t possible ‘out-of-the-box’ with SQL Express, as used by PDM Standard.

SQL Express Edition has no SQL Server Agent, meaning it isn't possible to create or execute Maintenance Plans which would be used to automate the process with SQL Standard.

This limitation makes it more difficult to generate regular backups, however we can still use a batch script to carry out these tasks, we just need to use Windows Task Scheduler to trigger the script instead.

The batch file runs an SQL script to generate a backup file (.bak) and save it to a specified location. It moves any existing backup files to a sub-folder and then deletes any older than a specified number of days.

It then runs a separate SQL script to rebuild the database index tables which can help improve and maintain performance. The batch file must be configured before use to work with your system.

Configuring the Backup Scripts
  1. Create a folder in which to save the backup files – it is recommended this is located in the same folder as your PDM archives and databases, e.g. C:\PDM_Admin\Backup.
  2. Extract the downloaded “SQL Express Backup.zip” to this same location (e.g. C:\PDM_Admin\SQL Express Backup).
  3. Browse into the “SQL Express Backup” folder and edit the BkUp.bat file by right-clicking it and selecting ‘Open With > Notepad’.
  4. Modify the highlighted sections to reflect your own environment:
    • Set BkUpLoc= Location you want the SQL database backup files to be created in.

      Note: Where possible, this should be the same location defined in SQL Management Studio. You may not select a UNC path or mapped drive, you must back up to a local folder. Check the SQL Service has read/write access to this folder.

    • Set TempLoc= Location where ‘old’ SQL database backup files are moved and deleted.
    • Set SQLInfo= Name of Server\SQL EXPRESS Instance name
    • Set BkUpScript= Path to SQL Script that generates the backup file (.bak) (Found in the extracted folder “SQL Express Backup”).
    • Set RebIndScript= Path to SQL Script that rebuilds the index tables (Found in the extracted folder “SQL Express Backup”).
    • ROBOCOPY %BkUpLoc% %TempLoc% /mov /minage:3 – Setting for how old backup files have to be before being deleted. E.g. “3” would delete backups older than 3 days.
  5. Edit the “SQLBackup” script in the same way as step 3, modifying the highlighted sections as below:
    • Set @PDMDB = Database name of your PDM STD vault. The database name can be found in the vault properties in the PDM Administration Tool. Right-click on the vault name and select ‘Properties’.
    • Set @BkUpLoc = Location for the database backup file to be saved in (The same location set in the batch script).
  6. After configuring each of these files, manually trigger “BkUp.bat” by double-clicking it and verify it runs as expected. Test the integrity of the backup file by restoring a database from it.
Automating the script using Windows Task Scheduler

Using Windows Task Scheduler, create a task which runs the batch file every night.

  1. Select ‘Action > Create Basic Task’
  2. Give the task an appropriate name and description.
  3. Select ‘Daily’
  4. Choose a start time for the task, we recommend a time when no one is working in PDM to avoid issues with performance and backup integrity.
  5. Choose the action ‘Start a program’.
  6. Browse for the “BkUp.bat” file.
  7. Review the options and if you are happy with everything, click ‘Finish’.
  8. In the Task Scheduler library, right-click the new action and select ‘Properties’.
  9. In ‘Security Options’, set the task to run as a user who you have confirmed is able to run the batch file manually, and select the option to “Run whether user is logged on or not”.
  10. With the script set to run as above, automatic backups should be taken daily and you will have the files required to recover your PDM database in the event of a failure, be that hardware or from a malware attack.

Disclaimer: This batch file and instructions above are provided for informational purposes only – it is your responsibility to test the backup procedure to ensure valid backup files are generated that can be used to restore the database.

You should also have a disaster recovery plan in place to utilise these backups in the event of loss of data.

Your backup files should be stored in multiple forms, preferably on separate sites, to protect against different scenarios – for example if malware has infected your entire network, an offline backup can still be used to recover from; or if your server becomes inoperable a cloud backup can be downloaded to new hardware.

For more information on disaster recovery or if you are concerned about your own system, then please give us a call on 01926 333777 and we can discuss your specific requirements and situation in more detail.

Take the Next Steps

Take a deeper dive into SOLIDWORKS PDM Pro and go beyond standard procedure to configure new workflows and advanced tools for managing your CAD data across your business.

You can even learn to master data management with our CPD-accredited SOLIDWORKS PDM training courses delivered by industry experts.

Related Blog Posts

Selecting the right Hardware for PDM
This blog details our up-to-date guidance for SOLIDWORKS PDM hardware.
All the New Features for Sheet Metal Designers and
Discover the new features and performance upgrades for Sheet Metal design coming in SOLIDWORKS 2025
How to Transfer a SOLIDWORKS License to Another PC
Learn how to deactivate and transfer your SOLIDWORKS license for use on different computers.

 Solid Solutions | Trimech Group

MENU
Top