This topic provides general guidelines for backing up your data. You must be a site administrator to complete this process.

You should regularly back up the following data in LabKey Server:

If you are using our recommended installation folder structure, you'll have these two locations, referred to generally by variable names and using forward slashes in our documentation. <LABKEY_HOME> is the same as <LK_ROOT>/labkey.
VariableLinux defaultWindows default

A <LK_ROOT>/backupArchive subdirectory is a good place to store backups locally. Create it if it does not already exist. Depending on your platform:


Do NOT store backups you want to save in the "<LABKEY_HOME>/backup" location (i.e. the same as "<LK_ROOT>/labkey/backup").

That directory is overwritten automatically at every upgrade with the immediate prior backup. Instead, create and use a <LK_ROOT>/backupArchive directory for your own backups. Create it if it does not exist.


Backup procedures will vary somewhat based on the type and location of your database. These guidelines can get you started.


The default LabKey installation uses a PostgreSQL database. PostgreSQL provides commands for three different levels of database backup: SQL dump, file system level backup, and on-line backup.

Find backup details in the PostgreSQL documentation for your version, available here:

Microsoft SQL Server (Premium Feature)

For further information about backing up and administering Microsoft SQL Server, see the documentation that came with your Microsoft SQL Server installation.

Data Files

Site-level File Root. You should backup the contents (files and sub-directories) of the site-level file root. The location of the site-level file root is set at: (Admin) > Site > Admin Console > Configuration > Files.

  1. Navigate to the file root location (for instance, it might be <LABKEY_HOME>/files).
  2. Right-click on the files folder and select Send To > Compressed (zipped) folder to create a zip file of the folder.
  3. Use the default folder name or rename it to better indicate the contents/timing of this backup.
  4. Move this zip file to <LK_ROOT>/backupArchive for safekeeping (outside the <LABKEY_HOME> area that may be overwritten).
Pipeline Files. You should also back up any directories or file shares that you specify as root directories for the LabKey pipeline. In addition to the raw data that you place in the pipeline directory, LabKey will generate files that are stored in this directory. The location of the pipeline root is available at: (Admin) > Go To Module > Pipeline > Setup.

Other File Locations. To see a summary list of file locations: go to (Admin) > Site > Admin Console > Configuration > Files, and then click Expand All. Note the Default column: if a file location has the value false, then you should backup the contents of that location manually. With clear zip file naming, backups can all go into the same location.

Note: For some LabKey Server modules, the files (pipeline root or file content module) and the data in the database are very closely linked. Thus, it is important to time the database backup and the file system backup as closely as possible.

LabKey Configuration and Log Files

Log Files. Log files are located in <LABKEY_HOME>/logs.

Configuration Files. Configuration files, including, are located in <LABKEY_HOME>/configs.

Related Topics

Was this content helpful?

Log in or register an account to provide feedback

expand allcollapse all