OK, I found out how to rebuild the DB by total accident today and it is a total workaround, the OC developers need a re-scan DB button
to verify changes to the filesystem and update the DB to match... This can take a while if you have a lot of folders and files. I use CENTOS 5.7 so my commands may be different that yours, you should get the general idea.
1) Copy your files:
*** You may have to set the permissions of your folder and contents to (drwxr-xr-x) /<owncloud directory>/data/<your user>/files/
2) Make apache the owner and group for all files and files/sub-folders: chown -R apache:apache <Your folder of files and other folders>
3) Empty(Truncate) the 'oc_fscache' Table:
To do this you have a couple options, either command line or phpMyAdmin phpMyAdmin:
Login, click owncloud DB, click 'oc_fscache', click 'EMPTY' Command Line:
Login to DB, 'TRUNCATE Table 'oc_fscache'
4) Login to the webgui:
It should start auto scanning the data to rebuild the oc_fscache table, you will see a message like this:
"Files are being scanned, please wait. 42857 files scanned
Current scanning /...
" ** NOTE ** I tried this with IE9 and it did not show the status, FireFox does so I recommend it so you can see the progress
5) Done. once finished scanning everything will be there, don't mess with it, just let it run.Other Notes:
If you want to add just a folder and some files and not re-scan the entire DB I found that mounting the path to webdav.php I could rsync files into it and they would show up. (you could also use CP, I like the progress indicator) Creating mount for WebDav
:mkdir /mnt/DavDropbox/mount -t davfs https://127.0.0.1/owncloud/files/webdav.php /mnt/DavDropbox/rsync -rv <your_folder>/ /mnt/DavDropbox/<your_folder>/ --progressOther Info:
After figuring this out I browsed google and found this page where someone suggests the same thing as a hotfix. Wish I would have found it earlier and saved a bunch of hours. It also looks like it is still 'open' and no one is working on a solution... http://bugs.owncloud.org/thebuggenie/owncloud/issues/oc-300
Good luck all, I will try to help if you have any questions.