TD0156 - Data Management Server 2010 Backup When running Autodesk Data Management Server, you should use the tools provided within the software to create a backup. The backup tools create a complete snapshot of the Vault database, filestore and customer Content Centre Libraries that can be archived to tape using your existing company backup software. The backup tool provides a series of command line driven features that can be run on the server via a batch routine. The batch routine should be run every day after the Vault users have finished working and it should complete prior to the start of main company backup. As the amount of data in the Vault increases, you should re-check the timings to ensure the ADMS backup completes before the main backup begins. Automate the backup by configuring a Windows Scheduled Task to run the batch routine every day. Do not assume that your IT Department are backing up the server and all data is recoverable. Archiving live SQL databases may not be possible with your backup software. Without the databases, the Vault filestore is not useable. Vault data restoration should be detailed specifically within your company disaster recovery plan. Test your backup and know that should the worst happen you can restore the data with the minimum of delay. Example backup routine The Data Management Server backup routine is detailed below. The paths to your files may be different so do not copy the following routine without checking and testing thoroughly. Rem Autodesk Data Management Server backup routine Rem Micro Concepts Ltd. 01223 716200 Rem This file should be run as a scheduled task daily and complete before the main tape backup begins Rem Remove previous backup that should have been archived to tape rd "c:\vault\backup" /s /q md "c:\vault\backup" Rem Detach read-only databases to reduce backup size N"AI2010_Inventor ANSI" -DF"C:\Program Files\Microsoft SQL Server\MSSQL$AUTODESKVAULT\Data\AI2010_Inventor ANSI.mdf" - N"AI2010_Inventor DIN" -DF"C:\Program Files\Microsoft SQL Server\MSSQL$AUTODESKVAULT\Data\AI2010_Inventor DIN.mdf" - N"AI2010_Inventor Feature" -DF"C:\Program Files\Microsoft SQL Server\MSSQL$AUTODESKVAULT\Data\AI2010_Inventor Feature.mdf" - N"AI2010_Inventor GOST" -DF"C:\Program Files\Microsoft SQL Server\MSSQL$AUTODESKVAULT\Data\AI2010_Inventor GOST.mdf" - N"AI2010_Inventor ISO" -DF"C:\Program Files\Microsoft SQL Server\MSSQL$AUTODESKVAULT\Data\AI2010_Inventor ISO.mdf" - N"AI2010_Inventor JIS & GB" -DF"C:\Program Files\Microsoft SQL Server\MSSQL$AUTODESKVAULT\Data\AI2010_Inventor JIS & GB.mdf" - N"AI2010_Inventor Other" -DF"C:\Program Files\Microsoft SQL Server\MSSQL$AUTODESKVAULT\Data\AI2010_Inventor Other.mdf" - N"AI2010_Inventor Parker" -DF"C:\Program Files\Microsoft SQL Server\MSSQL$AUTODESKVAULT\Data\AI2010_Inventor Parker.mdf" - N"AI2010_Inventor Routed Systems" -DF"C:\Program Files\Microsoft SQL Server\MSSQL$AUTODESKVAULT\Data\AI2010_Inventor Routed Systems.mdf" - N"AI2010_Inventor Sheet Metal" -DF"C:\Program Files\Microsoft SQL Server\MSSQL$AUTODESKVAULT\Data\AI2010_Inventor Sheet Metal.mdf" - Rem Initiate Vault backup "C:\Program Files\Autodesk\Autodesk Data Management Server 2010\ADMS Console\connectivity.admsconsole.exe" -Obackup - B"C:\vault\backup" -L"C:\Vault\Backup\VaultBackup.txt" -VAL - Rem Reattach read-only databases N"AI2010_Inventor ANSI" -DF"C:\Program Files\Microsoft SQL Server\MSSQL$AUTODESKVAULT\Data\AI2010_Inventor ANSI.mdf" - Page 1 of 5
N"AI2010_Inventor DIN" -DF"C:\Program Files\Microsoft SQL Server\MSSQL$AUTODESKVAULT\Data\AI2010_Inventor DIN.mdf" - N"AI2010_Inventor Feature" -DF"C:\Program Files\Microsoft SQL Server\MSSQL$AUTODESKVAULT\Data\AI2010_Inventor Feature.mdf" - N"AI2010_Inventor GOST" -DF"C:\Program Files\Microsoft SQL Server\MSSQL$AUTODESKVAULT\Data\AI2010_Inventor GOST.mdf" - N"AI2010_Inventor ISO" -DF"C:\Program Files\Microsoft SQL Server\MSSQL$AUTODESKVAULT\Data\AI2010_Inventor ISO.mdf" - N"AI2010_Inventor JIS & GB" -DF"C:\Program Files\Microsoft SQL Server\MSSQL$AUTODESKVAULT\Data\AI2010_Inventor JIS & GB.mdf" - N"AI2010_Inventor Other" -DF"C:\Program Files\Microsoft SQL Server\MSSQL$AUTODESKVAULT\Data\AI2010_Inventor Other.mdf" - N"AI2010_Inventor Parker" -DF"C:\Program Files\Microsoft SQL Server\MSSQL$AUTODESKVAULT\Data\AI2010_Inventor Parker.mdf" - N"AI2010_Inventor Routed Systems" -DF"C:\Program Files\Microsoft SQL Server\MSSQL$AUTODESKVAULT\Data\AI2010_Inventor Routed Systems.mdf" - N"AI2010_Inventor Sheet Metal" -DF"C:\Program Files\Microsoft SQL Server\MSSQL$AUTODESKVAULT\Data\AI2010_Inventor Sheet Metal.mdf" - Explanation of backup routine The batch routine begins by removing the previous backup. As the backup is contained in a folder with the time and date in the name we need to manually remove the previous backup daily. Remove directory silently and with sub folders: rd <folder> /q /s Recreate folder to contain backup: md <folder> The Data Management Server can host your Content Center databases. These databases are read-only and it is not necessary to archive this information as it can be restored from the installation DVD. These read-only databases can be detached prior to creating the snapshot of the Vault saving around 3GB of files being copied and archived. -Odetachlibrary Library to detach: -N library display name Path to database file: -DF path to.mdf file The main Vault backup is next. The options are: -Obackup The backup location: -B path to backup folder Create a log file: -L path to log file.txt Optional backup validation: -VAL Read only libraries: -DBSC (Can be used instead of Odetachlibrary and Oattachlibrary) To reattach the read-only databases, copy the detachlibrary section and replace the operation with attachlibrary. -Oattachlibrary Library to detach: -N library display name Path to database file: -DF path to.mdf file Page 2 of 5
Testing We would recommend testing the batch routine with all S options removed until you have proven the routine completes without errors. The silent option will suppress any dialogue boxes during unattended backups. All switches are case sensitive and should use a minus symbol followed by the option. Any paths or names with spaces should be contained within speech marks as path and name. On a regular basis, check the backup script to ensure the backup is completing successfully. You may also check the scheduled task dialogue to see the last run date and status columns. To test your backup, restore a Vault backup from tape and install ADMS on an available PC. Restore the backup on the new ADMS and check for errors. Do not restore the backup on the live ADMS server. User permissions Any Vault user with administrator rights can be used to authenticate the backup within the batch file. We would suggest creating a specific backup user for this process as changing a user s password without updating the batch routine would cause the backup to fail. The batch routine should be run as a scheduled task on a daily basis. The scheduled task requires a Windows login to run the process. If the user details change, the scheduled task and therefore the Vault backup will fail. We would suggest creating a specific Windows user for this process that is less likely to have a password change than an active end user account. As the backup routine creates a duplicate of the databases and the filestore, the hard disk space requirement is large. The backup should be created on a local drive. This includes internal drives, USB drives and some network allocated storage. It is possible to create the backup on another server if the correct user permissions are set. Refer to the ADMS Advanced Configuration Guide for further details. The Advanced Configuration Guide is available from support.autodesk.com Page 3 of 5
Vault version purging Autodesk Vault maintains every version of every file checked in providing a rich engineering history of how every part, assembly and drawing has been developed. Some users find this information extremely useful to refer to and begin new designs from earlier versions. In other companies, this history is less useful. In this case, the history can be removed from the server using the purge routine to free disk space and speed up the backup process. Purge can be run from the ADMS Console on the server as a one off process or from a command line. This document focuses on the command line use of the purge utility. The command line purge can be added at the end of the backup script above. Purge uses the same executable as the backup routine with different switches. An example of a command line purge is: Rem Initiate Vault purge "C:\Program Files\Autodesk\Autodesk Data Management Server 2010\ADMS Console\connectivity.admsconsole.exe" -Opurge N Vault KEEPVERS5 - This line should be repeated for each Vault hosted on the server. Purge command line switch definitions -Opurge The Vault name to purge: -N<Vault Name> Number of versions to keep: -KEEPVERS<number> (KEEPVERS used for Vault installations) -UNCONTROLLED (Use in place of KEEPVERS if using Vault Workgroup, Collaboration or Manufacturing for document release). Age of files to purge: -MINAGE<ndays> (optional) Comments to exclude from purge: -EXCLCMT<comment> (optional) Purge should only be run after discussing the requirements with the Vault users. Once purged, the old vault versions will be permanently deleted. Old versions that are referenced in the Vault by Labels or Productstream Items will not be purged. Vault Collaboration and Vault Manufacturing backup additions Using the Vault Collaboration or Vault Manufacturing data management server allow hot backups and incremental backups. Hot backups allow the backup process to take place while users are accessing the Vault. There are no switches or settings to enable the hot backup function. Incremental backup reduces the time taken to create a backup. This is especially useful for multi site Vault implementations where the maintenance window between sites is minimal. The incremental backup uses a INC switch in the ADMS backup to initiate an incremental backup. This can only be done after a full backup has been undertaken. The full backup must include all of the read only databases. Typically, a full backup will take place during a weekend followed by incremental backups Monday to Thursday. This requires two batch routines with scheduled tasks. Incremental backup archives only new or modified files in the file store as well as any changes to user accounts. Files and libraries that have not changed are not included in an incremental backup. You are not able to use the DBSC or DetachLibrary switches when utilising incremental backup. Page 4 of 5
Restoring documents The Vault is backed up as a package and individual files are not identifiable to be restored. The restore process should be to restore a backup into a new installation of ADMS on a temporary server or workstation. The user can login to this Vault and extract the required files. An alternate restore solution exists if disk space is available. As part of the Vault Software Development Kit (SDK) that ships with Vault sample code is provided to create a mirror of the Vault content in a standard Windows folder. The latest version of all files can be copied to a folder by using a script. Should users delete files in the Vault, they can be copied from the mirror location without restoring the Vault backup. The Vault Mirror should not be used as a method of backing up the Vault and the resultant mirror location should not be accessible by the users. Changes to files in the mirror location will not be transferred back into the Vault. The sample SDK scripts are not supported by Autodesk and are supplied only as examples. The Vault Mirror utility is located here: C:\Program Files (x86)\autodesk\data Management Server 2010\SDK\VS8\CSharp\VaultMirror\bin\Release\VaultMirror.exe In the first instance, the VaultMirror.exe file should be run from this location using the GUI to specify a Vault login, server name, Vault name and mirror location. The values are saved in a settings.dat file alongside the executable. Creating a full mirror will reproduce the entire Vault folder structure with the latest versions of each file in the desired location. Partial Mirror will add new and renamed files from the Vault to the mirror location. Files deleted or renamed in the Vault will not be removed from the mirror location using a Partial Mirror. To run the mirror automatically, create a batch routine to run VaultMirror.exe with the command line switches below: "C:\Program Files (x86)\autodesk\data Management Server 2010\SDK\VS8\CSharp\VaultMirror\bin\release\VaultMirror.exe" -L"c:\log.txt" -FullMirror U<vault_user> -P<vault_password> -S<server_name> -V<vault_name> Command to run: Create a log file: Create a full mirror: Create a partial mirror: Vault user login: Vault user password: Specify ADMS server name: Specify Vault name to mirror: VaultMirror.exe -L path to log file -FullMirror -PartialMirror -U<vault_user> -P<vault_password> -S<server_name> -V<vault_name> The Partial Mirror script can be run frequently to ensure new data is copied to the mirror location. You may decide to run the full mirror script on a weekly basis to remove old data from the mirror location. Run the batch routine from the VaultMirror.exe file location as the settings.dat file will be referred to. C:\Program Files (x86)\autodesk\data Management Server 2010\SDK\VS8\CSharp\VaultMirror\bin\Release\Partial.bat Page 5 of 5