Exporting projects
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.
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 consistent backup.
Flags
--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"
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.
Last updated
Was this helpful?