I lost a 1TB folder... Can it be restored?

What is the problem you are having with rclone?

I think I just lost a 1TB folder due to my stupidity :cold_sweat:
While browsing through my Jottacloud crypt remote, in a mounted volume on Windows, I accidentally dragged a 60TB folder into another folder. When I realized what I had done, I panicked and quickly closed both the rclone cmd window and the Windows file transfer window. After doing that I mounted the volume again and checked if all my folders were still in the same place. And since they were I thought everything was okay.
A couple of hours later I was copying some files to my now lost folder. When I did this rclone started copying files that I had already backed up a few days ago, so I stopped the copy and opened the folder to check what was going on. To my absolute horror the folder was completely empty apart from the two files I had just started copying. :sob:
I then started checking through my other folders, and it turned out a bunch of the other sub-folders had been emptied as well. I was able to restore all the other folders by going to jottacloud.com in my browser and copying all the empty folders to a temporary folder on my remote, which somehow managed to restore the files. But the 1TB folder I had started copying files to did not recover any files when I copied it to the temp folder.

Since I don't have any other backups of the entire folder, this forum is probably my only hope in having my files restored.

I accidentally moved a 60TB folder inside another folder. Then I closed rclone in a panic.This caused many sub-folders to be emptied. Since I didn't notice this, I started copying files to the remote again, which seems to have permanently overwritten one folder. It looks like I was able to restore all the other folders, but I don't know how to restore the last folder.

What is your rclone version (output from rclone version)

rclone v1.50.2

  • os/arch: windows/amd64
  • go version: go1.13.4

Which OS you are using and how many bits (eg Windows 7, 64 bit)

Windows 10 64bit

Which cloud storage system are you using? (eg Google Drive)


The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone mount Jottacrypt:/ L: --allow-other --tpslimit 60 --tpslimit-burst 60 --vfs-cache-mode writes --transfers=60 --cache-chunk-total-size 100G --size-only -v --cache-dir R:\

The rclone config contents with secrets removed.

type = opendrive
username = =REDACTED=
password = =REDACTED=

type = drive
token = {"access_token":"=REDACTED=","token_type":"Bearer","refresh_token":"=REDACTED=","expiry":"=REDACTED="}
root_folder_id = =REDACTED=

type = crypt
remote = Jottacloud:private
filename_encryption = standard
directory_name_encryption = true
password = =REDACTED=
password2 = =REDACTED=

type = jottacloud
user = =REDACTED=
mountpoint = Archive
token = {"access_token":"=REDACTED=","token_type":"bearer","refresh_token":"=REDACTED=","expiry":"=REDACTED="}
client_id = =REDACTED=
client_secret = =REDACTED=
tokenURL = https://id.jottacloud.com/auth/realms/jottacloud/protocol/openid-connect/token
configVersion = 1

type = b2
account = =REDACTED=
key = =REDACTED=

A log from the command with the -vv flag

Don't have any logs since I closed the cmd window.

Do they have some kind of trash?

Yes they do, but the files weren't moved to the trash folder.

I would do a recursive listing of the drive rclone lsf -R remote: > file.txt and search that file with a text editor just to make sure that the files you are looking for aren't somewhere strange.

The recursive listing command has been running for a very long time now, but it hasn't outputted anything to either the console or the text file.

Did it output something now?

If you want you could do rclone lsf -R remote: | tee file.txt so you can see the listing as it goes along.

I got this message: Failed to lsf: error in ListJSON: couldn't list files: Get https://www.jottacloud.com/jfs/=REDACTED=/Jotta/Archive/private?mode=list: EOF
I don't have tee installed, but doing rclone lsf Jottacrypt: without piping it doesn't show me anything in the console either.

Edit: It might be because of the ?mode=list query string. Because when I try opening that url in my browser, it just give me a blank page that loads indefinitely. However if I remove ?mode=list, it responds with some XML.

Hmm, try the list with --disable ListR - see if that works better

Thanks! That worked :slight_smile:
I'll let it run for a while and let you know if it's able to find my files.

1 Like

The folder didn't show up in the text file :frowning:

Any of the files in there?

No, they're not either.


You can do the same rclone lsf -R with the trash to double check that with the --jottacloud-trashed-only flag

If they aren't in the trash and aren't in the main listing then they are likely gone :frowning:

I got Fatal error: unknown flag: --jottacloud-trashed-only first, but updating fixed that issue.
However... It doesn't seem to only be scanning the trash dir. It looks like it's scanning both the trash dir and the main dir.
I'm also having another issue with the latest version. I constantly have to refresh my authentication token.
After it's been scanning for a few minutes, I get this message:

couldn't fetch token - maybe it has expired? - refresh with "rclone config reconnect Jottacloud:": oauth2: cannot fetch token: 400 Bad Request
Response: {"error":"unauthorized_client","error_description":"INVALID_CREDENTIALS: Invalid client credentials"}

Can you try the beta? There are some jottacloud Auth fixes in that

What about your total Jottacloud files size? Does it became smaller? If it doesn't, files probably is still somewhere there. I would sugest searching encrypted file names in jotacloud.com file search. You just need to know correct name of the file/folder. You can find your encrypted file name using rclone cryptdecode --reverse remote: "file_name.ext" (can also input full dir).

I'm still getting authentication errors with the beta.

I got no results searching for the encrypted folder name.

Folder search do not work on the website. My bad, haven't actually checked for it. Expected that thing to work. Search for files. Ensure that it is 100% correct. I hope you can recreate/find some file names from that lost folder.

Holy shit! That actually worked :smiley: It found a file from my missing folder.
But when I go to the path where it says the folder is, it not there. :worried: I can however download the file using the search results page.
If only I had a list of all the filenames, this could have been solved now. Neither rclone (my windows mount) or jottacloud see that folder except for in the search results on jottacloud.

Ah, so it sounds like the folder is unlinked somehow.

It might be worth asking Jottacloud support about this, maybe they can relink the folder.