Backup plugin error deleteOldBackupSets

Operating system

Windows

Joplin version

3.6.14

Desktop version info

Joplin 3.6.14 (prod, win32)

Device: win32, 13th Gen Intel(R) Core(TM) i9-13900K
Client ID: e8c406bc8f7745d3a5ce0c27be5f816b
Sync Version: 3
Profile Version: 49
Keychain Supported: Yes
Alternative instance ID: -
Sync target: OneDrive
Editor: Rich Text

Revision: 7e2765a

Backup: 1.5.1
Freehand Drawing: 4.3.0

What issue do you have?

When I view Joplin, I often have a error window that states the following:
Backup plugin
Error on file/folder delete in deleteOldBackupSets: EPERM, Permission denied: \?\D:\Documents\Backups\JoplinBackup\202605122232 '\?\D:\Documents\Backups\JoplinBackup\202605122232'

Note: I have Joplin set to save 5 backup files and I have it set to create subfolders. After the May 15, 2026 backup I changed the file naming format to MM-DD-YYYY, and, as you can see in the files in the backup folder, the 202605122232 is not the fifth to last backup, so I don't know why Joplin is trying to delete that folder. It is possible that it has attempted to delete previous backup folders. I am also not sure what the permissions error is. Everyone has full permissions on the JoplinBackup folder. Please let me know if you need more information.

Screenshots

I'm having the same issue. The backup itself seems to be deleted without issue, but Joplin is having trouble with deleting the folder that stores the backup.

I'm having the same issue. I moved the backup to a new folder, still within OneDrive. I have the setting to "Keep 10 backups" - so it worked fine for 10 days, and then the next day when it actually had to try to delete one of the backups, the error came back.

I suppose a workaround is to manually delete 3-4 of the old backups, so that will give you 3-4 days of no errors.

It's nice to know I'm not the only one with the problem. Maybe we're the only ones who have Joplin do backups and therefore run into problems deleting the backups. I've checked out the permissions for the folders and subfolders that Joplin uses and I am the owner and have full effective access to these folders. So the problem is not on my end. It is a Joplin developer problem.

Yes, what you've said is a pretty easy workaround, and I've deleted backup set as well. So, I stopped getting errors (well, only every 5 backups, which is all I try to keep).

However, I was hoping that Joplin support would weigh in here with a permanent fixed (or fix the program).

Here's hoping!

JB

I'm going to delete the entire Joplin backup folder and see what happens over the next 5 backups. Perhaps this will solve the problem.

I know this is not a fix for the bug but, I changed my backup destination to be a subfolder inside the same folder where the Joplin.exe exists. I then wrote a one liner robocopy script to sync the local backup folder to my OneDrive folder and I set it up to trigger after the backup occurred in the Joplin Backup settings.

This accomplishes the goal of backing up to your OneDrive account without having that annoying error message pop up every time you open Joplin.

I created c:\Apps\Scripts\JoplinBackup.bat and placed something similar to what is listed below in that batch file.

robocopy c:\JoplinAppFolder\JoplinBackup "c:\Users\runningUser\OneDrive - runningUser\JoplinBackup" /MIR /R:3 /W:5 /NP

I hope this helps, at least until a fix is in place.

kurtweber,

I see what you're doing. Since deleting the last backup (in my case backup number 5) is creating the error, it should work just to run a script to move (or copy and delete) the backup folder to any other location. That way I don't have to change my backup folder in Joplin. Joplin throws no errors when backing up, only when trying to delete the FILO backup folder.

It is a good workaround, but still a little clumsy when a fix to the permissions is really what's required.

I found another simple solution. I set my number of backups to 100+. I go and delete the last x number of backups. Problem solved. Not a great solution if you don't have adequate space, so you can set it for much lower, say 20 or 30 and set a reminder to go and delete some backups every once in a while rather than letting Joplin delete the last backup.

I have reported this as an issue in Github. There is also another report a few days ago. No response to Github issue to date.

Backups created on Gdrive don't have permission for auto delete

#15163

As I'm sure you are aware, it isn't just on the GDrive that deleting the last backup throws an error. Joplin throws the error when backups are saved to a regular hard drive (SSD).