[GH-ISSUE #4154] [FR] garbage collection for old or no longer used log files and images #1859

Open
opened 2026-03-23 21:17:46 +00:00 by mirror · 3 comments
Owner

Originally created by @MacMeikel on GitHub (Dec 16, 2023).
Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/4154

Originally assigned to: @appflowy on GitHub.

Description

It would be useful if there was a "carbage collection" button (or something similar) under "Settings" that could be used to delete all old or no longer needed files of the folder "AppFlowyDataDoNotRename".

Impact

The "carbage collection" function reduces the number of files, which leads to a reduction in folder size. Firstly, this would be an advantage for users who regularly back up their data. Secondly, it would be an advantage for support if there are problems with the data and the entire "AppFlowyDataDoNotRename" folder has to be sent for data recovery.

Additional Context

I have been using Appflowy since v0.0.5.3 and have made many updates (W11, portable/. zip) since then. I have now looked at the files in the folder "AppFlowyDataDoNotRename" and noticed the following: 1) In the folder "AppFlowyDataDoNotRename": there are now many files (129) that start with "AppFlowy-Client.log" and "log". One log file is even 47MB in size! 2) In the folder "collab_db" there are now many files (270) with the extension ".log" and many files that begin with "LOG.old". 3) The "images" folder still contains images that are no longer included in AppFlowy.

Originally created by @MacMeikel on GitHub (Dec 16, 2023). Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/4154 Originally assigned to: @appflowy on GitHub. ### Description It would be useful if there was a "carbage collection" button (or something similar) under "Settings" that could be used to delete all old or no longer needed files of the folder "AppFlowyDataDoNotRename". ### Impact The "carbage collection" function reduces the number of files, which leads to a reduction in folder size. Firstly, this would be an advantage for users who regularly back up their data. Secondly, it would be an advantage for support if there are problems with the data and the entire "AppFlowyDataDoNotRename" folder has to be sent for data recovery. ### Additional Context I have been using Appflowy since v0.0.5.3 and have made many updates (W11, portable/. zip) since then. I have now looked at the files in the folder "AppFlowyDataDoNotRename" and noticed the following: 1) In the folder "AppFlowyDataDoNotRename": there are now many files (129) that start with "AppFlowy-Client.log" and "log". One log file is even 47MB in size! 2) In the folder "collab_db" there are now many files (270) with the extension ".log" and many files that begin with "LOG.old". 3) The "images" folder still contains images that are no longer included in AppFlowy.
Author
Owner

@MacMeikel commented on GitHub (Dec 16, 2023):

nathan.fooo likes the idea and would like the issue to be assigned to him

<!-- gh-comment-id:1858898370 --> @MacMeikel commented on GitHub (Dec 16, 2023): nathan.fooo likes the idea and would like the issue to be assigned to him
Author
Owner

@appflowy commented on GitHub (Dec 20, 2023):

Hello @MacMeikel, I appreciate your suggestion. After considering it, I believe that retaining logs for a period of 5 days should suffice. Regarding the 'LOG.old' file in the collab_db, it is essential to note that this file cannot be deleted as it is utilized by the rocksdb.

<!-- gh-comment-id:1863809711 --> @appflowy commented on GitHub (Dec 20, 2023): Hello @MacMeikel, I appreciate your suggestion. After considering it, I believe that retaining logs for a period of 5 days should suffice. Regarding the 'LOG.old' file in the collab_db, it is essential to note that this file cannot be deleted as it is utilized by the rocksdb.
Author
Owner

@MacMeikel commented on GitHub (Dec 22, 2023):

Hello @appflowy , I can't say how long is reasonable, but I can imagine that even 10 days won't lead to a huge flood of files.
I have 145 'LOG.old' files that were created in the period of 3 months. I do not know the function of "rocksdb", but are all files needed?
And what about the images that are in the 'images' folder but are no longer displayed in AppFlowy because they have been deleted there? Shouldn't these images be automatically deleted from the folder?
As you have seen, I have a total of 3 folders with databases (the folder 'collab_db' and file 'flowy-database.db') in the folder 'AppFlowyDataDoNotRename', of which only one is still in use from my point of view. One folder was created by v0.3.9, which is definitely not used. Couldn't the 'carbage collection' also recognize that these are unused databases and also delete these folders automatically?

<!-- gh-comment-id:1868090799 --> @MacMeikel commented on GitHub (Dec 22, 2023): Hello @appflowy , I can't say how long is reasonable, but I can imagine that even 10 days won't lead to a huge flood of files. I have 145 'LOG.old' files that were created in the period of 3 months. I do not know the function of "rocksdb", but are all files needed? And what about the images that are in the 'images' folder but are no longer displayed in AppFlowy because they have been deleted there? Shouldn't these images be automatically deleted from the folder? As you have seen, I have a total of 3 folders with databases (the folder 'collab_db' and file 'flowy-database.db') in the folder 'AppFlowyDataDoNotRename', of which only one is still in use from my point of view. One folder was created by v0.3.9, which is definitely not used. Couldn't the 'carbage collection' also recognize that these are unused databases and also delete these folders automatically?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AppFlowy-IO/AppFlowy#1859
No description provided.