Paperless NGX backup is never deleted and leads to orphans #2270

Closed
opened 2025-11-20 05:26:28 -05:00 by saavagebueno · 7 comments
Owner

Originally created by @ProfDrYoMan on GitHub (Nov 7, 2025).

Have you read and understood the above guidelines?

Yes

📜 What is the name of the script you are using?

Paperless NGX

📂 What was the exact command used to execute the script?

bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/paperless-ngx.sh)"

⚙️ What settings are you using?

  • Default Settings
  • Advanced Settings

🖥️ Which Linux distribution are you using?

Debian 13

📈 Which Proxmox version are you on?

9.0.11

📝 Provide a clear and concise description of the issue.

Update generates orphans because backup never gets deleted.

Backup is just done here: 3f04a6df3b/ct/paperless-ngx.sh (L42)

Then it is played back here: 3f04a6df3b/ct/paperless-ngx.sh (L50)

But afterwards the backup is not deleted! It should be deleted.

If a document is deleted or moved in path, next time with the update it is restored although it should be not existing or is stored somewhere else.

Orphans are generated.

🔄 Steps to reproduce the issue.

Run update in the LXC.

Paste the full error output (if available).

.

🖼️ Additional context (optional).

No response

Originally created by @ProfDrYoMan on GitHub (Nov 7, 2025). ### ✅ Have you read and understood the above guidelines? Yes ### 📜 What is the name of the script you are using? Paperless NGX ### 📂 What was the exact command used to execute the script? bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/paperless-ngx.sh)" ### ⚙️ What settings are you using? - [ ] Default Settings - [ ] Advanced Settings ### 🖥️ Which Linux distribution are you using? Debian 13 ### 📈 Which Proxmox version are you on? 9.0.11 ### 📝 Provide a clear and concise description of the issue. Update generates orphans because backup never gets deleted. Backup is just done here: https://github.com/community-scripts/ProxmoxVE/blob/3f04a6df3b97fca63af87a0f016e78367020e036/ct/paperless-ngx.sh#L42 Then it is played back here: https://github.com/community-scripts/ProxmoxVE/blob/3f04a6df3b97fca63af87a0f016e78367020e036/ct/paperless-ngx.sh#L50 But afterwards the backup is not deleted! It should be deleted. If a document is deleted or moved in path, next time with the update it is restored although it should be not existing or is stored somewhere else. Orphans are generated. ### 🔄 Steps to reproduce the issue. Run update in the LXC. ### ❌ Paste the full error output (if available). . ### 🖼️ Additional context (optional). _No response_
saavagebueno added the bug label 2025-11-20 05:26:28 -05:00
Author
Owner

@MickLesk commented on GitHub (Nov 7, 2025):

That is only the Migration Task? If the Tool is migrated to uv, you never get this?

Or can you show an example? Ive never get Issues with this update

@MickLesk commented on GitHub (Nov 7, 2025): That is only the Migration Task? If the Tool is migrated to uv, you never get this? Or can you show an example? Ive never get Issues with this update
Author
Owner

@ProfDrYoMan commented on GitHub (Nov 7, 2025):

Seems not. I am pretty sure it’s in the if condition without uv migration.

I do not understand why there is a backup anyhow.

In the case of an normal update (not the uv migration) there is no need to backup, or am I wrong?

@ProfDrYoMan commented on GitHub (Nov 7, 2025): Seems not. I am pretty sure it’s in the if condition without uv migration. I do not understand why there is a backup anyhow. In the case of an normal update (not the uv migration) there is no need to backup, or am I wrong?
Author
Owner

@MickLesk commented on GitHub (Nov 8, 2025):

Im at evening on Computer, i can Check it, or feel free to create an PR (i see your fix)

@MickLesk commented on GitHub (Nov 8, 2025): Im at evening on Computer, i can Check it, or feel free to create an PR (i see your fix)
Author
Owner

@ProfDrYoMan commented on GitHub (Nov 8, 2025):

My solution works. I just do not understand why there is backup in that case anyhow.

@ProfDrYoMan commented on GitHub (Nov 8, 2025): My solution works. I just do not understand why there is backup in that case anyhow.
Author
Owner

@MickLesk commented on GitHub (Nov 8, 2025):

Thanks, I saw it. It's there because it was actually intended to perform a proper CLEAN_INSTALL. But somehow we forgot about it. I've added a few more minor details and created a new PR. Thanks for pointing that out.

@MickLesk commented on GitHub (Nov 8, 2025): Thanks, I saw it. It's there because it was actually intended to perform a proper CLEAN_INSTALL. But somehow we forgot about it. I've added a few more minor details and created a new PR. Thanks for pointing that out.
Author
Owner

@ProfDrYoMan commented on GitHub (Nov 8, 2025):

You might know what you do. I do not know what CLEAN_INSTALL will do.

@ProfDrYoMan commented on GitHub (Nov 8, 2025): You might know what you do. I do not know what CLEAN_INSTALL will do.
Author
Owner

@MickLesk commented on GitHub (Nov 8, 2025):

its one of our helper, it clean the whole folder, (like rm -rf), because an tarball extract and override and create new files, but old files still present and lead into issues sometimes

@MickLesk commented on GitHub (Nov 8, 2025): its one of our helper, it clean the whole folder, (like rm -rf), because an tarball extract and override and create new files, but old files still present and lead into issues sometimes
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/ProxmoxVE#2270