I folllowed the steps here to move the data directory: https://doc.owncloud.com/server/admin_manual/maintenance/manually-moving-data-folders.html
Gives following error
All the other steps worked without errors. Everything seems to work and it looks like data is transferred to to right location.
Someone who knows what the problem is here?
Can you run the following select?
SELECT * FROM oc_storages WHERE id='local::/var/www/html/owncloud/data/';
Can you also run:
SELECT * FROM oc_storages WHERE id='local::/mnt/owncloud/data/';
So ID is the primary key of the table(?), and I would guess somehow that there is already an entry with the new path. So potentially you could just delete that row? Perhaps @jvillafanez can chime in?
Anyone an idea? I just want to be sure it’s safe to use it like this.
OK, so. I re-read the instructions, and I guess you’ve added the datadir directory in your config.php before you started doing these steps, so ownCloud already created that entry in
oc_storages. Can you confirm that?
As far as I can tell there are no other references
oc_storages. Can you run the following, just to be sure:
where table_schema = 'owncloud'
and referenced_table_name = 'oc_storages';
If you get
Empty set (0.00 sec) as a reply you should be good to delete that column (with the old data folder in it).
This is indeed the case. The outcome of the commands:
Is this the correct command to remove the row?
DELETE FROM oc_storages WHERE id='local::/var/www/html/owncloud/data/';
Thank you very much!
The delete looks correct to me. It might be overkill for this simple delete, but I use the following process for this:
BEGIN; #start a transaction
SELECT * FROM oc_storages WHERE id='local::/var/www/html/owncloud/data/'; # check the row you want to delete
DELETE FROM oc_storages WHERE id='local::/var/www/html/owncloud/data/'; # run the actual delete
SELECT * FROM oc_storages WHERE id='local::/var/www/html/owncloud/data/'; # check that you deleted what you wanted to delete
COMMIT; # finish transaction, run ROLLBACK(); if you didn't delete the right thing