Menu

Revit Server: Backing up files and keeping the cache refreshed

By Anna Liza Montenegro | IT

Revit Server is a useful tool for multi-site collaboration, but it also has some limitations, and some issues that require preparation and attention.

The first issue is: how should I back up the models that are in Revit Server?
The second is:  when accessing models on the Accelerator, why do they open quickly on some occasions, and very slowly on others?

The answers to these issues are linked.  Let’s start by reviewing some backup methods. 

Method 1:  Backing Up the Projects Folder on the Host

As you may have noticed, there is no process in the GUI to back up the models.  This is the most straight-forward method of backing up files, but it has several limitations.

On the Host, the models are stored in the Projects directory.  By default, this folder is c:\ProgramData\Autodesk\Revit Server 2015\Projects (where “2015” is the year of the Revit Server version).

1

However, there are some complications.  The primary issue is that the Projects folder does not, in fact, contain standard Revit files; it breaks the file down into a number of files, in several subfolders.  If you try to open the *.RVT file contained in the Projects folder, it may not open at all.

2

 

Another issue is that the models ought to be locked prior to running the backup, otherwise the files could have issues on restore.  If you run your backup after hours, you will need to lock the models using a script.  Fortunately, Revit Server includes command-line tools for this task.  By default, it is at:

C:\Program Files\Autodesk\Revit Server 2015\Tools\RevitServerCommand

Here is one possible option for scripting a backup process:

“C:\Program Files\Autodesk\Revit Server 2015\Tools\RevitServerCommand” lock -s RevitServerName

robocopy “c:\ProgramData\Autodesk\Revit Server 2015\Projects” “c:\RevitServerBackupDirectory” -r:0 -w:0 /z /mir/log:c:\LogFiles\RevitServerBackup.log

“C:\Program Files\Autodesk\Revit Server 2015\Tools\RevitServerCommand” unlock -s RevitServerName

The most critical issue with this backup method, though, is that in order to restore models this way, the entire Projects Folder needs to be restored to a functioning Revit Server.  Without the proper Model Location Table files, Revit Server will not recognize the model(s).

Obviously, this type of backup has numerous limitations.  It will only work on the Host server, and it is not ideal to make snapshots of the model in progress.  As such, you should also utilize Method 2.

 

Method 2:  Scripting the Creation of Local Files

Fortunately, Autodesk added some command line tools which are useful for backup, as well as for refreshing the cache on the Accelerator(s).

By default, the command line tool is located at C:\Program Files\Autodesk\Revit Server 2015\Tools\RevitServerToolCommand

4

 The usage of the tool is:

RevitServerTool createLocalRVT <model path> -s|-server <server name> [-a|-accelerator <accelerator name>] [-d|-destination <path>] [-o|-overwrite]

The “model path” refers to the path in Revit Server, not a folder path.  (E.g. in the example below, we will use “TEST” as the path.)

New Picture (3)

The “Server” entry is the name of the Host; this is required.  If you are running the script on the accelerator, use the “-a” switch to indicate the name of the Accelerator.  The “-a” switch should be omitted when running the script on the Host.

The destination can use absolute, relative and UNC paths.  The -o switch will overwrite an existing file.

It is critical to note that every model that is on the Revit Server requires its own entry.  Here’s an example of a script, which backs up two models on an accelerator.

New Picture (4)

It is also critical to note that if you are scripting the process, you must use the -o (overwrite) switch.  Otherwise, the script will not create a new file.

New Picture

Method 2 offers numerous advantages over backing up the Projects directory on the host.

  1. This can be run on any Revit server, including the Host and all Accelerators.  This provides multiple physical locations for the backup.  If you are working with a third party, it also provides each firm with their own copy of the files.
  2. The files created are actual Revit files, which can be opened normally in Revit.
  3. The resulting files can be properly used as snapshots, as long as your backup software does versioning.
  4.  When the script is run on an Accelerator, this will refresh the cache.

As noted earlier, in some instances opening a model from an Accelerator can take a long time.  This is actually by design; the Accelerator is programmed to flush out the cache, in order to minimize the load on the Revit Server AutoSync service, as it means fewer models to keep up-to-date.

Method 2, therefore, offers many advantages over Method 1, especially if the models on the Accelerator are accessed infrequently and occasionally get flushed out of the cache.

INDUSTRIES:

Published on August 14, 2014 in IT.

About the Author

Anna Liza Montenegro develops design technology conferences for architecture, engineering, and construction (AEC) professionals as a forum to exchange innovative strategies, and best practices, and facilitate discussions into the technology trends driving significant change in building design and construction. As Director of Marketing and as a trained architect, these events are offered to AEC professionals by Microsol Resources, a value-added reseller of Autodesk, Bluebeam, Rhino, Chaos V-Ray & Enscape, Egnyte and other various technology partnerships.

BACK TO TECH RESOURCES