Monday, November 16, 2020

moving lots of files with BOX

I had to move like 300K files in BOX, so just sharing a bit of how I did it and how to check the progress.

Basically, get:

1. BOX drive (no gnu/linux version available, so mounting the "folder" on a gnu/linux VM as a shared dir, and working from there)

2. A gnu/linux VM (I use virtualbox) with the necessary kernel stuff to mount shared dirs (thing to mount vboxfs)


I guess you could have done something similar in windows or mac too just writing a program directly in those platforms. But I hate both OSs, so, no.


You just write the program to rename/move the files however you want, and run it as with any other dir.


The catchy part is that box is super slow (for me at least), so even when in your disk all files would have been updated fairly fast, in the background, the thing takes forever to finish the sync... so if you check in the web version, many of the files would still be in the old location/will have their old filenames.

There should be a file called Box-{version?}.log in:

c:/Users/$USER/AppData/Local/Box/Box/logs/


There you should be able to see logs in the format:

DATE TIME ID? INFO    LocalExecutor-2      box_fs_sync_api       Move item on box.  XXXX

Telling you what it's doing.
I also mounted this in my VM and checked the logs with tail -f.


As of the time of this post, there is apparently no way to tell the sync progress besides this... And you basically will have to grep the log and compare with the list of files done with whatever you have in order to have an idea of the total percentage.

Not the coolest system.

Until the sync is complete, your box drive icon will show "Box Drive is updating your files" on mouse over. And it takes really super long... But maybe it's because of the many requests I sent, so my account was limited or something. It's like 1~3 requests a second based on the logs above.

If you're luckier than me, it should take under 3 days. If not, I hope you have a quiet computer.