Feature ask :: Recover deleted page/chapter/book #239

Closed
opened 2026-02-04 17:55:17 +03:00 by OVERLORD · 9 comments
Owner

Originally created by @patoroco on GitHub (Jan 18, 2017).

Hi,

should be possible to save a history / revisions of deleted pages/chapters/books? It's dangerous to allow to full-delete by error and don't allow to recover the pages.

Maybe this feature exists, but I haven't find it :)

Originally created by @patoroco on GitHub (Jan 18, 2017). Hi, should be possible to save a history / revisions of deleted pages/chapters/books? It's dangerous to allow to full-delete by error and don't allow to recover the pages. Maybe this feature exists, but I haven't find it :)
OVERLORD added the 🛠️ Enhancement label 2026-02-04 17:55:17 +03:00
Author
Owner

@thestepafter commented on GitHub (Jan 23, 2017):

Yes, please add this feature to help with avoiding the loss of data if you delete something you shouldn't have.

@thestepafter commented on GitHub (Jan 23, 2017): Yes, please add this feature to help with avoiding the loss of data if you delete something you shouldn't have.
Author
Owner

@monitaurus commented on GitHub (Jan 23, 2017):

I would just add that history (or revisions) is a really great feature, even more if you are using an app for collaborative work.

@monitaurus commented on GitHub (Jan 23, 2017): I would just add that history (or revisions) is a really great feature, even more if you are using an app for collaborative work.
Author
Owner

@patoroco commented on GitHub (Feb 9, 2017):

My suggest is to save revision, and delete page from database.

Maybe should be possible to have a "trash", where you can un-delete pages in last 30 days? In other case, remove totally (with all attachments).

What do you think?

@patoroco commented on GitHub (Feb 9, 2017): My suggest is to save revision, and delete page from database. Maybe should be possible to have a "trash", where you can un-delete pages in last 30 days? In other case, remove totally (with all attachments). What do you think?
Author
Owner

@pdfrod commented on GitHub (Sep 13, 2019):

A book has just disappeared and I have no idea who deleted, when or why. So yeah, something should be done in this department. At least an audit trail.

@pdfrod commented on GitHub (Sep 13, 2019): A book has just disappeared and I have no idea who deleted, when or why. So yeah, something should be done in this department. At least an audit trail.
Author
Owner

@ssddanbrown commented on GitHub (Sep 14, 2019):

@pdfrod Just an FYI, If you'd like to find out what happened, Delete actions are commonly recorded but just not reflected in the UI. You can find them in the database on the activities table:

SELECT * FROM activities
     WHERE `key` LIKE '%_delete'
     ORDER BY created_at DESC

The extra column contains the name of the item deleted, The user_id is the users table id of the user that triggered that action.

@ssddanbrown commented on GitHub (Sep 14, 2019): @pdfrod Just an FYI, If you'd like to find out what happened, Delete actions are commonly recorded but just not reflected in the UI. You can find them in the database on the `activities` table: ```sql SELECT * FROM activities WHERE `key` LIKE '%_delete' ORDER BY created_at DESC ``` The `extra` column contains the name of the item deleted, The `user_id` is the `users` table id of the user that triggered that action.
Author
Owner

@pdfrod commented on GitHub (Sep 14, 2019):

That's helpful, thanks a lot @ssddanbrown!

@pdfrod commented on GitHub (Sep 14, 2019): That's helpful, thanks a lot @ssddanbrown!
Author
Owner

@patoroco commented on GitHub (Nov 3, 2019):

Thanks @ssddanbrown !

@patoroco commented on GitHub (Nov 3, 2019): Thanks @ssddanbrown !
Author
Owner

@ssddanbrown commented on GitHub (Dec 12, 2020):

I've added a recycle bin implementation in #2283, which will be part of the next release (v0.31). Additionally, as of v0.30 it's possible to see delete events in the audit log (https://www.bookstackapp.com/blog/beta-release-v0-30-0/).

Since the code for this has been merged, ready for a release, I'm going to close this off.

@ssddanbrown commented on GitHub (Dec 12, 2020): I've added a recycle bin implementation in #2283, which will be part of the next release (v0.31). Additionally, as of v0.30 it's possible to see delete events in the audit log (https://www.bookstackapp.com/blog/beta-release-v0-30-0/). Since the code for this has been merged, ready for a release, I'm going to close this off.
Author
Owner

@patoroco commented on GitHub (Dec 12, 2020):

Thanks for taking this one @ssddanbrown !

@patoroco commented on GitHub (Dec 12, 2020): Thanks for taking this one @ssddanbrown !
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#239