Seadrive started to delete all my files

Big issue this evening. Just provisioning a new Win10 VM, where I installed Seadrive 2.0.8 (it’s connecting against a Seafile Pro 7.1.8). Everything was fine, but then, I deleted a single folder in one seafile library, and just after I’ve refreshed my DHCP IP address (ipconfig /release then ipconfig /renew). As soon as network was up again, Seadrive started to delete all the files in all the libs I have write access. It just left empty folders everywhere. I disconnected the account as soon as I could, but it had already removed thousands of files everywhere. I had to rollback my Seafile VM from a snapshot (thanks to my ZFS backing store, I could rollback ~15min in the past, just before the incident)
This is a huge issue. Here are a few logs snippet

At 19:13 everything was fine. Then at 19:20:18, seadrive found a file $R3YCRWY which wasn’t from a seafile repo. Have no idea how this file appeared here.

[11/17/20 19:13:32] Repo 'Ma bibliothèque FWS' sync state transition from 'committing' to 'synchronized'.
[11/17/20 19:20:18] Path 9305443-2860414252-1791713313-1105/$R3YCRWY is not under a repo.
[11/17/20 19:20:18] failed to get repo id and repo path by \$Recycle.Bin\S-1-5-21-1769305443-2860414252-1791713313-1105\$R3YCRWY
[11/17/20 19:20:20] Repo 'Ma bibliothèque FWS' sync state transition from 'synchronized' to 'committing'.
[11/17/20 19:20:20] All events are processed for repo c5cb13c5-4e5c-442d-8296-d76401ad417a.
[11/17/20 19:20:20] Repo 'Ma bibliothèque FWS' sync state transition from 'committing' to 'uploading'.
[11/17/20 19:20:20] Upload with HTTP sync protocol version 2.
[11/17/20 19:20:20] Transfer repo 'c5cb13c5': ('normal', 'init') --> ('normal', 'check')
[11/17/20 19:20:21] Transfer repo 'c5cb13c5': ('normal', 'check') --> ('normal', 'commit')
[11/17/20 19:20:21] Transfer repo 'c5cb13c5': ('normal', 'commit') --> ('normal', 'fs')
[11/17/20 19:20:21] Transfer repo 'c5cb13c5': ('normal', 'fs') --> ('normal', 'data')
[11/17/20 19:20:21] Transfer repo 'c5cb13c5': ('normal', 'data') --> ('normal', 'update-branch')
[11/17/20 19:20:21] Transfer repo 'c5cb13c5': ('normal', 'update-branch') --> ('finished', 'finished')
[11/17/20 19:20:21] removing blocks for repo c5cb13c5-4e5c-442d-8296-d76401ad417a

A few sec later, I released my IP address (ipconfig /release), so network connection was lost. And back on ~1min later. And this is where it started to delete everything

[11/17/20 19:20:57] libcurl failed to POST https://seafile.fws.local/seafhttp/repo/folder-perm: Couldn't resolve host name.
[11/17/20 19:20:59] libcurl failed to POST https://seafile.fws.local/seafhttp/repo/locked-files: Couldn't resolve host name.
[11/17/20 19:21:05] libcurl failed to GET https://seafile.fws.local/seafhttp/accessible-repos/?repo_id=1e4013b0-2fdb-4988-9d19-c130232121ec: Couldn't resolve host name.
[11/17/20 19:22:48] Repo 'pub' sync state transition from 'synchronized' to 'committing'.
[11/17/20 19:22:48] Repo 'Ma bibliothèque FWS' sync state transition from 'synchronized' to 'committing'.
[11/17/20 19:22:48] All events are processed for repo c5cb13c5-4e5c-442d-8296-d76401ad417a.
[11/17/20 19:22:48] All events are processed for repo e18e4c1c-71b6-44f1-8962-4a9782883481.
[11/17/20 19:22:48] Repo 'Ma bibliothèque FWS' sync state transition from 'committing' to 'uploading'.
[11/17/20 19:22:48] Upload with HTTP sync protocol version 2.
[11/17/20 19:22:48] Transfer repo 'c5cb13c5': ('normal', 'init') --> ('normal', 'check')
[11/17/20 19:22:48] Transfer repo 'c5cb13c5': ('normal', 'check') --> ('normal', 'commit')
[11/17/20 19:22:48] Transfer repo 'c5cb13c5': ('normal', 'commit') --> ('normal', 'fs')
[11/17/20 19:22:48] Transfer repo 'c5cb13c5': ('normal', 'fs') --> ('normal', 'data')
[11/17/20 19:22:48] Transfer repo 'c5cb13c5': ('normal', 'data') --> ('normal', 'update-branch')
[11/17/20 19:22:48] Repo 'pub' sync state transition from 'committing' to 'uploading'.
[11/17/20 19:22:48] Upload with HTTP sync protocol version 2.
[11/17/20 19:22:48] Transfer repo 'e18e4c1c': ('normal', 'init') --> ('normal', 'check')
[11/17/20 19:22:48] Transfer repo 'c5cb13c5': ('normal', 'update-branch') --> ('finished', 'finished')
[11/17/20 19:22:48] removing blocks for repo c5cb13c5-4e5c-442d-8296-d76401ad417a
[11/17/20 19:22:48] Repo 'Ma bibliothèque FWS' sync state transition from 'uploading' to 'get sync info'.
[11/17/20 19:22:48] Repo 'Ma bibliothèque FWS' sync state transition from 'get sync info' to 'synchronized'.
[11/17/20 19:22:49] Transfer repo 'e18e4c1c': ('normal', 'check') --> ('normal', 'commit')
[11/17/20 19:22:49] Transfer repo 'e18e4c1c': ('normal', 'commit') --> ('normal', 'fs')
[11/17/20 19:22:49] Transfer repo 'e18e4c1c': ('normal', 'fs') --> ('normal', 'data')
[11/17/20 19:22:49] Transfer repo 'e18e4c1c': ('normal', 'data') --> ('normal', 'update-branch')
[11/17/20 19:22:49] Transfer repo 'e18e4c1c': ('normal', 'update-branch') --> ('finished', 'finished')

This is really bad.

Just wanted to let you know: unless the garbage collector was running no data was actually removed from the server at all. All the data should be accessible through the history.

As the deletes were spread accross a lot of different libs (and for some reason, for some of them, the history did not show the “rollback whole lib to this commit” button), it was just quicker and safer for me to rollback the whole VM (ZFS taking snapshots every 15min)

1 Like

There was one issue that could cause such deletions. But it’s supposed that it was fixed in 2.0.7 version already. That issue happens when you remove an account or logout an account with cache removed, then login the same account again. Did you execute such operations before the deletion happened?

Nop, I didn’t logged out of the account. What I did :

  • Deleted a file in a lib
  • Disconnected the network (ipconfig /release)
  • Reconnected the network (ipconfig /renew)

Just when the network came back, the deletes started. Also, it’s a fresh 2.0.8 install, not an upgrade from an earlier release.

Hello,
I just had the same problem.

I have 3000 files in the recycle bin.

Unfortunately it seems to me that I have to do it manually for each file?

Do you have a faster solution for me?

I’m a little sad

(and for some reason, for some of them, the history did not show the “rollback whole lib to this commit” button)

this is because you don’t have admin permissions on those libs, see: Restore library revision not working on shared library

I do have admin permissions on those libs. But the “Rollback” button only appears for the owner of the libs.

It just happened again! Customer reports:

After installing Seadrive (without previously existing data) all files but no directories in all writable libs were deleted directly after login.
What happened was roughly described in forum post 13227. Only here it happened directly after the first login.

@rdb Can you share the seadrive.log file to me?