paperless-ngx: PAPERLESS_POST_CONSUME_SCRIPT reddit / selfhosted ---------------------------------------------------------------------- abcdefghijklmopqrstx · 2023-11-10 09:11 I have this rather simple PAPERLESS\_POST\_CONSUME\_SCRIPT which works standalone when executed via cli in docker container. `#!/usr/bin/env bash` `touch /usr/src/paperless/script/newfile` However it fails when executed after document was consumed `xxx.pdf: Error while executing post-consume script: Command '['/usr/src/paperless/script/post_consume.sh', ... ]' returned non- zero exit status 1.` I'm a bit lost WHAT I WANT to achieve: some sort of trigger after documents where consumed, so my daily backup knows whether to run or not (background: synology btrfs snapshots are running and it bloats my storage occupation). My idea was to check for "newfile" and - if it exists - delete it and create a backup BTW: off topic: is there any way to achieve this when a document was edited ? ​ ---------------------------------------------------------------------- Vyerni11 · 2023-11-10 09:43 Don't have an answer to the main question. But how are the snapshots bloating? It doesn't add anything more, just keeps a snapshot of what you had, unless you're constantly rewriting data. ---------------------------------------------------------------------- abcdefghijklmopqrstx · 2023-11-10 09:53 I create a full backup every day using paperless build in 'document\_exporter -z' . So a new archive once a day. However ... while re reading the documentation of 'document\_exporter' again I see that not exporting as zip archive may also be a suitable option. ---------------------------------------------------------------------- HecateRaven · 2023-11-10 10:16 Do you have permission to touche the file with the user ? ---------------------------------------------------------------------- abcdefghijklmopqrstx · 2023-11-10 15:35 thank you... that was the issue. Folder permission was set to root. ---------------------------------------------------------------------- HecateRaven · 2023-11-10 15:38 😅 It's always that for a small script like this. Tbh I encountered same issue few days ago so...