Moving an Assay Container's file root and updating Data file pointers

LabKey Support Forum (Inactive)
Moving an Assay Container's file root and updating Data file pointers Anthony Corbett  2013-10-29 08:36
Status: Closed
 
I have an assay container with some assay designs which already have imported runs. I'm now trying to move the file root (at the folder level) to another location. I tested this and it seems to move the root and create a new @files directory in the new location, however, none of the files were copied from the old location to the new.

If I do manually move the files, will I then need to update the file pointers in the exp.Data table?

Is there a better way to migrate this container and its data to a new file system location and still have the database in a consistent state (file pointers are not orphaned)?

Thanks in advance,

Anthony
 
 
Karl Lum responded:  2013-10-30 17:27
Hi Anthony,

If you modify the folder level file root (from the files tab), the server won't attempt to move files even if you are going from the default to an override or from an override to the default. Historically, LabKey regards default file roots as 'managed' and will attempt to move and keep file pointers up to date. Non-managed roots (folder/project overrides and file sets) are assumed to be under the control of the user and the server won't try to do anything with them. We could perhaps look to change this in the future and possibly give users the option to move artifacts automatically.

If you manually move the files, then yes you would need to manually update any exp.Data references.

If a folder (or project) is using a default root, then they could be moved using the 'move' button in the folder management->folder tree tab. This should move files and virtual directories as well as fixup file references in the system. I realize this isn't exactly the scenario you were looking for, but I'm not aware of another way that the underlying file system root can get modified and consistency maintained.

- Karl