Hi all, I just want to share my experience with moving 40GB folders on external share which is simply impossible on 8.2.7. It always ended with timeout, sooner than 3600 sec, etc. Eventually, I did it by hand:
- created new target folders
- updated oc_filecache
- moved subfolders on external storage, ie. on Windows server
I used this sql procedure, with source and target path as parameters:
create procedure rename_folder (in source varchar(255), in target varchar(255))
declare done int default false;
declare src varchar(255);
declare stor int(11);
declare tgt varchar(255);
declare cur1 cursor for select fileid from oc_filecache where path=source;
declare continue handler for not found set done=true;
fetch cur1 into src;
select storage into stor from oc_filecache where fileid=src;
select fileid into tgt from oc_filecache where storage=stor and path=target;
if done then leave read_loop; end if;
update oc_filecache set parent = tgt where parent = src;
update oc_filecache set path = replace(path,source,target), path_hash = md5(replace(path,source,target)) where path like concat(source,"/%");
Then I called it: CALL rename_folder("source_path","target_path");
When done, I moved all content of source folder to target folder on external server. Owncloud was put in maintenance mode during whole operation.
The content was moved and all shared links were kept and remain working.
Hope this help someone.