Seafile Data Recovery After DB Loss

Hi,

I have been running Seafile Community Edition on Docker with data on external disk.

My system disk failed and I think I have lost database, but I am certain I kept actual data directories.

Is there a way to get to see contents of these files?

If I setup another image will I be able to drop Seafile disk on a new system? Will it see my files?

or is it considered a loss?

I ended up succeeding, but I had an old DB backup in the form of sql files.

The procedure is centered around https://download.seafile.com/published/seafile-manual/backup/maintain/seafile_fsck.md#user-content-Exporting%20Libraries%20to%20File%20System

In my case I stood up Seafile Docker instance and mounted backed up data directory.

Then I had to restore database manually for all 3 databases.

Then export option worked.

Without proper DB configuration export will NOT work or at least I was not able to get it to work.

1 Like

Hi. I did some database crash recovery testing a few years back (complete loss of sql database) Shall I recover a Seafile storage, recreating a new seafile server and connecting it? - #6 by Gronis

Why did you decide to put all Docker data on an external drive? As far as I understand, most accidental deletions occur on external drives. diagnosis before the process works.

Hey,
there are three different cases:

  1. if you have data and backup, just restore described in the manuall: Backup and Recovery - Seafile Admin Manual

  2. if you only have the data and not the library seafile still can recover all the files: Seafile FSCK - Seafile Admin Manual
    You get all the data but user info, sharing permissions, and who has access to what is gone. This info is in the database only.

  3. if you only have the database: sorry. your data is gone…

Best regards
Christoph

It is recommended to try some data recovery software, such as Geekersoft.

All data loss scenarios that ive read on this forums has been attributed to bad architecture. Unless its experimental, I dont see why you would want to risk your data.

At first I was a bit skeptical about having my file hash stored in a DB, and I can say after 4 years 24/7 operation and my library has over 370,000 files, Seafile has never skipped a beat.

Have your DB and Seafile Data on one VM, that is on a redundant disk array + realtime hardware notifications+ daily backups onsite and offsite, and you would be solid. Note I have never had the need to revert to any of my backups after 4 years of operation. good luck

If you still have the data directories, you should be able to see the contents of those files. You can try accessing them through the command line or a file manager.