Skip to content

Exporting Projects Script Erroring #412

@JohnClient

Description

@JohnClient

Hi all,

I want to be able to access my files from another location on my server, as such I found this script online:
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"

from here: https://docs.overleaf.com/on-premises/maintenance/data-and-backups/exporting-projects

when I run this I get:
{"name":"default","hostname":"36cdbd5d3dbb","pid":480,"level":40,"msg":"graceful shutdown: started shutdown sequence","time":"2025-12-05T00:05:10.140Z","v":0}
{"name":"default","hostname":"36cdbd5d3dbb","pid":480,"level":30,"stage":"optionalBeforeStoppingTraffic","msg":"graceful shutdown: run handlers","time":"2025-12-05T00:05:10.140Z","v":0}
{"name":"default","hostname":"36cdbd5d3dbb","pid":480,"level":40,"msg":"graceful shutdown: closing http server","time":"2025-12-05T00:05:11.140Z","v":0}
{"name":"default","hostname":"36cdbd5d3dbb","pid":480,"level":30,"stage":"requiredBeforeDrainingConnections","msg":"graceful shutdown: run handlers","time":"2025-12-05T00:05:11.141Z","v":0}
{"name":"default","hostname":"36cdbd5d3dbb","pid":480,"level":30,"stage":"connectionDrainer","msg":"graceful shutdown: run handlers","time":"2025-12-05T00:05:11.141Z","v":0}
{"name":"default","hostname":"36cdbd5d3dbb","pid":480,"level":30,"stage":"optionalAfterDrainingConnections","msg":"graceful shutdown: run handlers","time":"2025-12-05T00:05:11.146Z","v":0}
{"name":"default","hostname":"36cdbd5d3dbb","pid":480,"level":30,"msg":"graceful shutdown: ready to exit","time":"2025-12-05T00:05:11.146Z","v":0}
{"name":"default","hostname":"36cdbd5d3dbb","pid":480,"level":50,"err":{"message":"request failed","name":"RequestFailedError","stack":"RequestFailedError: request failed\n at fetchNothing (/overleaf/libraries/fetch-utils/index.js:83:11)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async Object.flushProjectToMongoAndDelete (file:///overleaf/services/web/app/src/Features/DocumentUpdater/DocumentUpdaterHandler.mjs:54:3)\n at async exportUserProjectsToZip (file:///overleaf/services/web/modules/server-ce-scripts/scripts/export-user-projects.mjs:90:5)\n at async exportAllUsersProjects (file:///overleaf/services/web/modules/server-ce-scripts/scripts/export-user-projects.mjs:157:5)\n at async main (file:///overleaf/services/web/modules/server-ce-scripts/scripts/export-user-projects.mjs:201:7)","info":{"url":"http://127.0.0.1:3003/project/6931f84cbbe21d24c8bad40f","method":"DELETE","status":500}},"msg":"Error in export-user-projects script","time":"2025-12-05T00:05:11.147Z","v":0}

I have just done a fresh install for unrelated reasons so the fix is not updating overleaf toolkit.
I have changed the overleaf port from default, and set listen ip to 0.0.0.0, other than that I have made no config changes.

Does anyone know why this script isn't working?

Or another way to export the files (.tex, .aux, etc.) from all projects from the host device.

Many thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions