Overleaf docs
Plans and pricingTemplatesUser docsGo to Overleaf
On-premises
On-premises
  • Welcome
    • Server Pro vs. Community Edition
  • Release notes
    • Release notes 5.x.x
      • Doc version recovery
    • Release notes 4.x.x
    • Release notes 3.x.x
      • Full project history migration
    • Release notes 2.x.x
    • Release notes 1.x.x
    • Release notes 0.x.x
  • Getting started
    • Before you start
    • Requirements
      • Skills needed
      • Hardware requirements
      • Software requirements
    • Microservices
    • Server Pro infrastructure
    • What is the Overleaf Toolkit?
  • Installation
    • Introduction
    • Using the Toolkit
      • 1: Download the Toolkit
      • 2: Familiarize yourself with the Toolkit
      • 3: Initialize the configuration
      • 4. Choose Community Edition or Server Pro
      • 5. Personalizing your instance
      • 6. Post-installation tasks
    • Air-gapped/offline deployments
    • Upgrading TeX Live
  • Configuration
    • Overleaf Toolkit
      • Files and locations
      • Toolkit settings
      • Environment variables
      • Server Pro-only configuration
        • LDAP
        • SAML 2.0
        • Sandboxed Compiles
        • Git integration
        • Templates
        • Adding LaTeX user help
      • Logging
      • TLS proxy
      • Branding
      • Localization
      • Email delivery
      • Redis
      • S3
  • Maintenance
    • docker-compose.yml to Toolkit migration
    • Upgrading your deployment
    • Data and backups
      • Exporting projects
    • Extending TeX Live
    • Horizontal scaling
    • S3 migration
    • Updating MongoDB
  • User and project management
    • User management
      • Username migration
    • Understanding license usage
    • Project management
  • Support
    • Project limits
    • Troubleshooting
    • Getting help
    • Support guides
      • Using templates as an individual
    • Overleaf user docs
Powered by GitBook
LogoLogo

Discover Overleaf

  • Home
  • Features

Solutions

  • Plans and pricing
  • For universities
  • For business
  • For government

Resources

  • Templates
  • User docs and LaTeX learning
  • Blog

© Overleaf

On this page
  • Limitations
  • Flags
  • Usage
  • Completion

Was this helpful?

Export as PDF
  1. Maintenance
  2. Data and backups

Exporting projects

PreviousData and backupsNextExtending TeX Live

Last updated 1 month ago

Was this helpful?

In Server Pro and Community Edition 5.4.0 we have included a script that allows Administators to export all user projects (including those still visible in the Deleted and Trashed folders) to a directory on disk.

The output from running this script is the same as manually downloading a Zip of all projects from the user's project dashboard. The script will flush any pending changes before starting the download to ensure that the export contains the latest version of the project.

Limitations

The export script has the following limitations:

  • No project settings, such as the TeX Live image name or compiler, are exported. These must be set when the project is uploaded to the user's account.

  • Exported projects don't contain any version history.

  • No collaborator information is preserved. Projects will need to be reshared. If using link-sharing, View and Edit links will be regenerated (they won't be the same as before).

  • Any comments and tracked change information won't be exported.

  • Project chat history won't be exported.

This script is not designed to replace a full system backup. To ensure you can recover your instance in a disaster recovery sceneario we strongly recommend taking a .

Flags

Name
Description

--help

Show help

--user-id

The user ID (required unless using --export-all or --project-id)

--project-id

Export a single project (cannot be used with --user-id or --export-all)

--list

List user's projects (cannot be used with --output)

--output

Output zip file (for single export operations)

--export-all

Export all users' projects (requires --output-dir)

--output-dir

Directory for storing all users' export files

--log-level

Log level s supported: trace|debug|info|warn|error|fatal

Default: error

Usage

Use the following command to export projects for all users:

# Overleaf Toolkit users
$ bin/docker-compose exec sharelatex /bin/bash -ce "cd /overleaf/services/web && node modules/server-ce-scripts/scripts/export-user-projects.mjs --export-all --output-dir=/var/lib/overleaf/data/exports"

# Legacy docker-compose.yml users
docker exec sharelatex /bin/bash -ce "cd /overleaf/services/web && node modules/server-ce-scripts/scripts/export-user-projects.mjs --export-all --output-dir=/var/lib/overleaf/data/exports"

If you are running Server Pro or Community Editition <= 3.5.13 you will need to update the above example to use the export-legacy-user-projects.js script.

Completion

Once the export is completed, you can access the files via the directory on the host that is bind-mounted to /var/lib/overleaf in your docker-compose.yml file or the OVERLEAF_DATA_PATH environment variable in the config/overleaf.rc file if you are using the Toolkit.

Overleaf currently allows for duplicate project names. If a user's project contains a duplicate, these projects will still be added to the user's Zip export, but when extracted, only one version will be present. On Linux, unzip -B will write files with the same name as backup files instead of overwriting.

consistent backup