[SOLVED] How to extract an encrypted library?

Hello,

how do you restore a encrypted library without SQL databases? All my important data was stored in an encrypted library which now is invisible to any Seafile installation. I still have all the files, but the main seafile-db Database is missing.

Thanks for any help.

I‘m sorry, exporting encrypted libraries with seaf-fsck is not supported yet: https://manual.seafile.com/maintain/seafile_fsck.html

Update: but you can try to recover your database: Database recovered from backup - data intact

3 Likes

Thanks a lot! This worked absolutely great!!

2 Likes

I‘m glad that worked for you! The credits go to @skauranne for the creation of the script and to @shoeper for the idea and support.

1 Like

hi @Simsala @shoeper @skauranne @daniel.pan

I had a similar issue with an encrypted password and i found a solution too, as i could recover from snapshots

issue : i changed the password of a encrypted library and mistyped it so i could not reopen the library
I did not synced the library before on any client so no other versiopn was available

BUT i had some backup !

  • snapshot of the files system
  • backup of the database

I checked them if there was something before the password change and i retiored them as follows

1/ restore library FS

rm -r /data/seafile-data/storage/fs/e2311bd1-47dc-4fd7-b4c4-e22668ed934e
cp -r /data/.snapshot/daily.2020-01-19_0010/seafile-data/storage/fs/e2311bd1-47dc-4fd7-b4c4-e22668ed934e  /data/seafile-data/storage/fs/

2/ read older DB backup (from IBM TIVOLI)

dsmc restore /opt/backup/database/seafile_db.sql.gz.2020-01-20 -inactive -pitd=20/01/2020

3/ Update current database with previous library info :

seafile_db::Branch
set old commit id >> in current database

"275" "master" "e2311bd1-47dc-4fd7-b4c4-e22668ed934e" "4d058bb5613b9c683075e6b8f756466cba478973"

The old password was restored and i clould recover the files

Hope this will help

1 Like