You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I understand that issues are for feedback and problem solving, not for complaining in the comment section, and will provide as much information as possible to help solve the problem.
I've looked at pinned issues and searched for existing Open Issues, Closed Issues, and Discussions, no similar issue or discussion was found.
I've filled in short, clear headings so that developers can quickly identify a rough idea of what to expect when flipping through the list of issues. And not "a suggestion", "stuck", etc.
I've confirmed that I am using the latest version of Cherry Studio.
Platform
Windows
Version
v1.7.18
Bug Description
Nutstore restore failed
When restoring a backup via WebDAV (Jianguoyun / NutStore), the following error occurs:
Investigation using Windows Resource Monitor confirmed that the process holding the lock on agents.db is Cherry Studio itself (Cherry Studio.exe), not any third-party software (e.g., OneDrive, antivirus, etc.).
This indicates that during the restore process, Cherry Studio attempts to unlink (delete) the agents.db file without first closing its own SQLite database connection, resulting in the file being locked by its own process.
Expected Behavior
During backup restoration, Cherry Studio should close its database connection to agents.db before attempting to replace the file, ensuring the restore process completes successfully.
Diagnostic Information
Confirmed via Windows Resource Monitor (CPU → Associated Handles → search agents.db):
Ruled out interference from OneDrive, antivirus, or other third-party software
Screenshots
Steps To Reproduce
Use Cherry Studio normally, ensuring Agent data exists (agents.db is present)
Go to Settings → Data Settings → WebDAV Cloud Backup (using Jianguoyun/NutStore)
Select a backup file and click "Restore"
Error appears: EBUSY: resource busy or locked, unlink ...agents.db
Expected Behavior
In the restore flow of BackupManager (restoreFromWebdav and related methods), close the SQLite database connection to agents.db before performing file replacement (unlink / rename). Re-establish the connection after the restore is complete.
Note: This issue may be related to PR #12830 (fix(agent): move agents.db into Data/ directory for backup consistency), but #12830 addressed path consistency while this issue concerns resource release during restoration.
Relevant Log Output
Additional Context
No response
Original Content
Issue Checklist
I understand that issues are for feedback and problem solving, not for complaining in the comment section, and will provide as much information as possible to help solve the problem.
I've looked at pinned issues and searched for existing Open Issues, Closed Issues, and Discussions, no similar issue or discussion was found.
I've filled in short, clear headings so that developers can quickly identify a rough idea of what to expect when flipping through the list of issues. And not "a suggestion", "stuck", etc.
I've confirmed that I am using the latest version of Cherry Studio.
Investigation using Windows Resource Monitor confirmed that the process holding the lock on agents.db is Cherry Studio itself (Cherry Studio.exe), not any third-party software (e.g., OneDrive, antivirus, etc.).
This indicates that during the restore process, Cherry Studio attempts to unlink (delete) the agents.db file without first closing its own SQLite database connection, resulting in the file being locked by its own process.
预期行为 / Expected Behavior
中文
恢复备份时,Cherry Studio 应先关闭对 agents.db 的数据库连接,然后再执行文件替换操作,确保恢复流程正常完成。
English
During backup restoration, Cherry Studio should close its database connection to agents.db before attempting to replace the file, ensuring the restore process completes successfully.
注意:此问题可能与 PR #12830(fix(agent): move agents.db into Data/ directory for backup consistency)相关,但 #12830 解决的是路径一致性问题,而本 issue 是恢复时的资源释放问题。
In the restore flow of BackupManager (restoreFromWebdav and related methods), close the SQLite database connection to agents.db before performing file replacement (unlink / rename). Re-establish the connection after the restore is complete.
Note: This issue may be related to PR #12830 (fix(agent): move agents.db into Data/ directory for backup consistency), but #12830 addressed path consistency while this issue concerns resource release during restoration.
Note
This issue was translated by Claude.
Issue Checklist
Platform
Windows
Version
v1.7.18
Bug Description
Nutstore restore failed
When restoring a backup via WebDAV (Jianguoyun / NutStore), the following error occurs:
Investigation using Windows Resource Monitor confirmed that the process holding the lock on
agents.dbis Cherry Studio itself (Cherry Studio.exe), not any third-party software (e.g., OneDrive, antivirus, etc.).This indicates that during the restore process, Cherry Studio attempts to
unlink(delete) theagents.dbfile without first closing its own SQLite database connection, resulting in the file being locked by its own process.Expected Behavior
During backup restoration, Cherry Studio should close its database connection to
agents.dbbefore attempting to replace the file, ensuring the restore process completes successfully.Diagnostic Information
Confirmed via Windows Resource Monitor (CPU → Associated Handles → search
agents.db):Cherry Studio.exe(PID: 147548)C:\\Users\\<username>\\AppData\\Roaming\\CherryStudio\\Data\\agents.dbScreenshots
Steps To Reproduce
EBUSY: resource busy or locked, unlink ...agents.dbExpected Behavior
In the restore flow of
BackupManager(restoreFromWebdavand related methods), close the SQLite database connection toagents.dbbefore performing file replacement (unlink/rename). Re-establish the connection after the restore is complete.Note: This issue may be related to PR #12830 (
fix(agent): move agents.db into Data/ directory for backup consistency), but #12830 addressed path consistency while this issue concerns resource release during restoration.Relevant Log Output
Additional Context
No response
Original Content
Issue Checklist
Platform
Windows
Version
v1.7.18
Bug Description
坚果云恢复失败/Nutstore restore failed
中文
通过 WebDAV(坚果云 / Jianguoyun)恢复备份时,出现以下错误:
通过 Windows 资源监视器(Resource Monitor)排查发现,锁定
agents.db文件的进程正是 Cherry Studio 自身(Cherry Studio.exe),而非任何第三方程序(如 OneDrive、杀毒软件等)。这说明在执行恢复操作时,Cherry Studio 没有先释放对
agents.db的 SQLite 数据库连接,就尝试unlink(删除)该文件以进行替换,导致文件被自身进程锁定而无法删除。English
When restoring a backup via WebDAV (Jianguoyun / NutStore), the following error occurs:
Investigation using Windows Resource Monitor confirmed that the process holding the lock on
agents.dbis Cherry Studio itself (Cherry Studio.exe), not any third-party software (e.g., OneDrive, antivirus, etc.).This indicates that during the restore process, Cherry Studio attempts to
unlink(delete) theagents.dbfile without first closing its own SQLite database connection, resulting in the file being locked by its own process.预期行为 / Expected Behavior
中文
恢复备份时,Cherry Studio 应先关闭对
agents.db的数据库连接,然后再执行文件替换操作,确保恢复流程正常完成。English
During backup restoration, Cherry Studio should close its database connection to
agents.dbbefore attempting to replace the file, ensuring the restore process completes successfully.排查信息 / Diagnostic Information
通过 Windows 资源监视器(CPU → 关联的句柄 → 搜索
agents.db)确认:Cherry Studio.exe(PID: 147548)C:\\Users\\<username>\\AppData\\Roaming\\CherryStudio\\Data\\agents.dbConfirmed via Windows Resource Monitor (CPU → Associated Handles → search
agents.db):Cherry Studio.exe(PID: 147548)C:\\Users\\<username>\\AppData\\Roaming\\CherryStudio\\Data\\agents.db截图 / Screenshots
Steps To Reproduce
EBUSY: resource busy or locked, unlink ...agents.dbEBUSY: resource busy or locked, unlink ...agents.dbExpected Behavior
在
BackupManager的恢复流程(restoreFromWebdav等方法)中,在执行文件替换(unlink/rename)之前,先关闭对agents.db的 SQLite 数据库连接。恢复完成后再重新建立连接。注意:此问题可能与 PR #12830(
fix(agent): move agents.db into Data/ directory for backup consistency)相关,但 #12830 解决的是路径一致性问题,而本 issue 是恢复时的资源释放问题。In the restore flow of
BackupManager(restoreFromWebdavand related methods), close the SQLite database connection toagents.dbbefore performing file replacement (unlink/rename). Re-establish the connection after the restore is complete.Note: This issue may be related to PR #12830 (
fix(agent): move agents.db into Data/ directory for backup consistency), but #12830 addressed path consistency while this issue concerns resource release during restoration.Relevant Log Output
Additional Context
No response