Restore Folder Marked as Deleted in MySQL Database

We tried to make LogicalDOC as intuitive as possible, but an advice is always welcome.

Moderator: car031

die7fox
Posts: 52
Joined: Thu Sep 18, 2014 10:20 am

Restore Folder Marked as Deleted in MySQL Database

Fri Aug 31, 2018 10:42 am

After a recent system recovery, we have noticed that one of our Workspaces has gone missing. When I log into the 'logicaldoc' database in MySQL, I can see what I believe to be the Workspace in the ld_folder table, and it is marked as deleted. We have had no luck finding this Workspace in any user's Trash (possible noncompliance with my search request).

Question: Is it possible to undelete a Workspace and all of its subfolders & files by setting ld_deleted to 0 in the database, or will that damage the system?
agaspa
Posts: 714
Joined: Tue Apr 20, 2010 8:24 am

Re: Restore Folder Marked as Deleted in MySQL Database

Fri Aug 31, 2018 3:05 pm

Hi die7fox,
you should restore a Workspace using SQL statement on the database.
Currently it is not possible to restore it smoothly from the GUI.

First select al workspaces from the table ld_folder

Code: Select all

SELECT ld_id, ld_name, ld_deleted, ld_type FROM ld_folder WHERE ld_type = 1 ;

UPDATE ld_folder SET ld_deleted = 0 WHERE ld_id = <use_ld_id_from-before>;
die7fox
Posts: 52
Joined: Thu Sep 18, 2014 10:20 am

Re: Restore Folder Marked as Deleted in MySQL Database

Fri Aug 31, 2018 3:08 pm

Thanks. That's what I was hoping I could do. Will undeleting the workspace also undelete all of its contents?
agaspa
Posts: 714
Joined: Tue Apr 20, 2010 8:24 am

Re: Restore Folder Marked as Deleted in MySQL Database

Fri Aug 31, 2018 3:34 pm

No, this will just undelete the workspace folder,
then you should relay on the function from the GUI to restore the deleted sub-folders (if there are any)
Administration, Reports, Deleted folders
(right mouse click on the single folders)

But before doing that I kindly suggest you to restart LogicalDOC service
Attachments
Reports-deleted-folders.png
Reports-deleted-folders.png (27.23 KiB) Viewed 3809 times
die7fox
Posts: 52
Joined: Thu Sep 18, 2014 10:20 am

Re: Restore Folder Marked as Deleted in MySQL Database

Fri Aug 31, 2018 9:34 pm

Thank you. After marking the workspace as active and restarting my logicaldoc services, I was able to recover my folders successfully.

Return to “Usage”

Who is online

Users browsing this forum: No registered users and 17 guests