Restore from disaster :(

So i have a seafile server that is completely wrecked.
However the datadrive containing the actual seafile folders has servived (the vmware vmdk files where on a physical different harddisk storage in another machine)
So i a have VMDK’s with the data
The OS VMDK is completely gone
I can mount the old vmdk in my newly installed linux server

1.(how) can get a list of the users that had an account on this server? ( i assume it was in the mysql database which was on the os drive,) there a file with a list of the emailaccounts ? can i copy the datafiles from the “old (virtual vmdk) harddisk” when i mount it to my newly installed linux debian machine? so i can get the users their files back

Kind Regards

Kind regards

Full recovery only works with a database backup.

File recovery (for unencrypted libraries) works with seaf-fsck ( File recovery for encrypted libraries can work with manual database editing. It requires deeper understanding on how Seafile works.

Dear Shoeper,

So in my situation there is only a way the recover the files (with seaf-fsck) from the users, but i do not get to know the login credentials that go those files?

Do i understand this correct like this?

Kind Regards

You can extract user names from the libraries but passwords are lost.

1 Like

AH, that’s cool tnx so much for this answer.
So i can match the files with their original accounts which i (obviously) will recreate)

So wil these usernames become visible when i do an export with the seaf-fsck command option?

Kind Regards


->./ -E /data/tmp/restore/ 41fd1c9c-XXXX-XXXX-XXXX-XXXXXXXXXXXX

Starting seaf-fsck, please wait …

[04/04/17 23:43:20] fsck.c(937): Scanning available commits for repo 41fd1c9c-XXXX-XXXX-XXXX-XXXXXXXXXXXX…
[04/04/17 23:43:20] fsck.c(977): Find available commit 27f95baa(created at 2016-05-22 14:20:33), will export files from it.
[04/04/17 23:43:20] fsck.c(1013): Start to export files for repo 41fd1c9c(My Library).
[04/04/17 23:43:20] fsck.c(880): Export file /data/tmp/restore/41fd1c9c_My Library_$USER@$DOMAIN/seafile-tutorial.doc.
[04/04/17 23:43:20] fsck.c(1030): Finish exporting files for repo 41fd1c9c.

->ls /data/tmp/restore/
41fd1c9c_My Library_$USER@$DOMAIN

=> username == $USER@$DOMAIN
=> library name == “My Library”


So what folders should i copy to my /data/tmp/restore
is see “commits”, with a repo ID
“fs” with a repo ID
and “blocks” with a repo ID

On my new virgin server it looks something like this (i guess my restore looks about the same, only more repo ID’s);
baas@mycloud:/opt/mycloud/installed/seafile-data# du
4 ./commits
4 ./tmpfiles
300 ./library-template
8 ./storage/commits/e661f32c-e6ff-4c1e-baba-4d5bfabc2736/88
12 ./storage/commits/e661f32c-e6ff-4c1e-baba-4d5bfabc2736
12 ./storage/commits/07b82a57-9df4-4f04-8be2-ac400f592b9a/92
16 ./storage/commits/07b82a57-9df4-4f04-8be2-ac400f592b9a
8 ./storage/commits/24bd3363-903b-4626-951e-5e3d3f8b5e64/32
8 ./storage/commits/24bd3363-903b-4626-951e-5e3d3f8b5e64/8e
20 ./storage/commits/24bd3363-903b-4626-951e-5e3d3f8b5e64
8 ./storage/commits/f6edd5c1-6286-48bd-af1e-8e9637e529d2/a9
8 ./storage/commits/f6edd5c1-6286-48bd-af1e-8e9637e529d2/ba
20 ./storage/commits/f6edd5c1-6286-48bd-af1e-8e9637e529d2
72 ./storage/commits
8 ./storage/fs/07b82a57-9df4-4f04-8be2-ac400f592b9a/b8
8 ./storage/fs/07b82a57-9df4-4f04-8be2-ac400f592b9a/dc
20 ./storage/fs/07b82a57-9df4-4f04-8be2-ac400f592b9a
8 ./storage/fs/24bd3363-903b-4626-951e-5e3d3f8b5e64/b8
8 ./storage/fs/24bd3363-903b-4626-951e-5e3d3f8b5e64/2e
20 ./storage/fs/24bd3363-903b-4626-951e-5e3d3f8b5e64
8 ./storage/fs/f6edd5c1-6286-48bd-af1e-8e9637e529d2/b8
8 ./storage/fs/f6edd5c1-6286-48bd-af1e-8e9637e529d2/e0
20 ./storage/fs/f6edd5c1-6286-48bd-af1e-8e9637e529d2
64 ./storage/fs
300 ./storage/blocks/07b82a57-9df4-4f04-8be2-ac400f592b9a/86
304 ./storage/blocks/07b82a57-9df4-4f04-8be2-ac400f592b9a
4 ./storage/blocks/24bd3363-903b-4626-951e-5e3d3f8b5e64/86
8 ./storage/blocks/24bd3363-903b-4626-951e-5e3d3f8b5e64
4 ./storage/blocks/f6edd5c1-6286-48bd-af1e-8e9637e529d2/86
8 ./storage/blocks/f6edd5c1-6286-48bd-af1e-8e9637e529d2
324 ./storage/blocks
464 ./storage
4 ./fs
4 ./httptemp
784 .

Kind regards

Let me refrase that last question.

How do i define the input path, because the data comes from a datadisk, and not a complete surviving seafile server.

Kind Regards

  1. Setup a dummy seafile installation
    mkdir -p $PATH/seafile-rescue
    cd $PATH/seafile-rescue
    wget -c ‘Service End for Bintray, JCenter, GoCenter, and ChartCenter | JFrog
    tar xvfz seafile-server_6.0.9_x86-64.tar.gz
    cd seafile-server-6.0.9
    => server name: rescue
    => server ip:
    => all other: just confirm defaults
  2. link seafile-data into the new installation
    cd $PATH/seafile-rescue
    mv seafile-data seafile-data-dummy
    ln -s /opt/mycloud/installed/seafile-data .
  3. Setup destination directory
    mkdir $PATH2/output
  4. Extract libraries
    cd $PATH/seafile-rescue/seafile-server-6.0.9
    ./ -E $PATH2/output e661f32c-e6ff-4c1e-baba-4d5bfabc2736


Many thanks for your help. Have a nice day.

I am only trying to help improving the software.
I am using it almost for 2 years now and realy like this community.

Do you have any idea why someone like shoeper gives this kind of response??
-Full recovery only works with a database backup.

It would give users the idea that the server product is completely dependent on the database.
Which is not. is it ??

Kind Regards

An extract from the Seafile user manual:

“There are two sets of data that need to be backup:
The seafile-data directory and the core library metadata tables in the seafile database. This data is the core data structures of the libraries in Seafile. They’re synced to the backup server with Seafile’s syncing algorithm. In this procedure, the metadata tables are kept consistent with the seafile-data directory.
All other tables in the database (including seafile, ccnet and seahub databases)” …