portainer-backup icon indicating copy to clipboard operation
portainer-backup copied to clipboard

Cannot run via docker-compose: Error: Cannot find module '/portainer-backup/src/index.js

Open jo-chemla opened this issue 2 years ago • 1 comments

When using the docker-compose workflow at the bottom of the portainer-backup readme, no backup is generated by cron job. The following error can be seen in the container logs:

Error: Cannot find module '/portainer-backup/src/index.js'
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
    at node:internal/main/run_main_module:17:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

jo-chemla avatar Oct 23 '23 13:10 jo-chemla

This bug happens if you use PORTAINER_BACKUP_DIRECTORY. Remove it or use ../backup/yourCustomName

oilervoss avatar May 30 '25 20:05 oilervoss