I migrated my sites on a new server.
Everything was fine (database, normal files, settings) but files handled by FF.
It seems that all these files in bitcache are unreadable after the move. Files added later behave properly.

What can be wrong?
Thanks for help

Comments

jvieille’s picture

Category: support » bug
Priority: Normal » Critical

This is scary: I had to upload again all files - backup of the site would not have helped.
Any explanation or advice for avoiding such critical issue?

jvieille’s picture

+1

jvieille’s picture

I am very concerned by this issue.
I could restore my corrupted files from other backups, but I would make sure that the files stored in FF/Bitcache are not at risk.

I thought about a possible explanation:

When I moved to a new linux server, I used my local Windows computer to download and upload the files by ftp from and to the bitcache directory.
Could this explain the corruption of the files?

miglius’s picture

File names in the bitcache are the hashes of the files' content. I would recommend you to calculate hashes for several random files in bitcache before the move and after the move and compare that with the file names. You should be able to track where files got corrupted.

jvieille’s picture

Thanks Miglius, the next time I'll do some tests during the transfer...
Which algorithm is in use by bitcache?

johanneshahn’s picture

Status: Active » Closed (won't fix)

hi,
bitcache is creating its hashes by function sha1_file(['path to file']) or sha1([data of file]).
so the only way your files get corrupt, after moving to another server, is changing the files content.
this can happen if u download them in single mode to a windows computer and upload it to a linux machine again.

so before download/upload single files, zip/tar them all and move zip/tar to other server and extract them there.

jvieille’s picture

Thanks for providing a sound (reassuring) explanation

johanneshahn’s picture

.