This topic is under construction for the 24.3 (March 2024) release of LabKey Server with embedded Tomcat 10. For the previous documentation, click here.
This topic provides general guidelines for backing up your data. You must be a site administrator to complete this process. If you are using our
recommended folder configuration,
You should backup the following data in LabKey Server:
If you are using our
recommended folder configuration, you'll have these two locations, referred to generally by variable names and using forward slashes in our text.
Variable | Linux default | Windows default |
---|
LABKEY_ROOT | /labkey | C:\labkey |
LABKEY_HOME | /labkey/labkey | C:\labkey\labkey |
The <LABKEY_ROOT>/backup subdirectory is a good place to store backups locally. Depending on your platform:
/labkey/backup
or
C:\labkey\backup
Database
Backup procedures will vary somewhat based on the type and location of your database. These guidelines can get you started.
PostgreSQL
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.
- Navigate to the file root location (for instance, it might be <LABKEY_HOME>/files).
- Right-click on the files folder and select Send To > Compressed (zipped) folder to create a zip file of the folder.
- Use the default folder name or rename it to better indicate the contents/timing of this backup.
- Move this zip file to <LABKEY_ROOT>/backup 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 application.properties, are located in
<LABKEY_HOME>/configs.
Related Topics