Overview
You have migrated your Xinet installation from macOS to Linux and notice that when you move files between folders on your /Volumes/ mounted Volumes, the asset metadata is being lost. You see that Xinet has created a symbolic link between the old path and the new path.
Solution
During the migration, Xinet will establish a symlink between the non-existent old macOS /Volumes/ path to the new Linux mount point. While this enables access to your existing content, it is suggested that you adjust the Volume paths to avoid issues with metadata being lost when moving assets between folders.
Consider an example where you previously located your Xinet Volumes at /Volumes/raid
and they are now located at /raid
. When checking the path set within Xinet, you see that it is still referencing /Volumes/raid
, which is symlinked to the new /raid
path:
Manually Adjusting Volume Paths
The commands below use the example paths above as placeholders. When executing these commands within your own environment, adjust the commands below as appropriate for your actual system paths.
-
-
Make a Full Backup of the Venture DB before proceeding.
- Stop the dblogd process:
# /usr/etc/venture/bin/dblogd -k
- Login to the Mysql Console:
# /usr/etc/venture/bin/mysql -u root -p
- Switch to the Webnative database:
mysql> use webnative;
- Verify the total existing instances of the old path:
mysql> SELECT count(*) FROM Path WHERE Path LIKE "Volumes/raid%";
-
Note: Consider adding a LIMIT to this statement if you have many paths matching the string.
-
- Update the path in the path table:
mysql> UPDATE path SET Path=CONCAT("/raid", SUBSTRING(Path,12)) WHERE Path LIKE ("Volumes/raid%") ORDER BY PathID;
- Check that you updated all paths:
mysql> SELECT count(*) FROM Path WHERE Path LIKE "Volumes/raid%";
-
Note: This should return a count of 0.
-
- Change the path in the activepath, filerename, failedpreview, and volume tables.
mysql> UPDATE activepath SET activePath=CONCAT("/raid", SUBSTRING(activePath,12)) WHERE activePath LIKE ("Volumes/raid%");
mysql> UPDATE filerename SET OldName=CONCAT("/raid", SUBSTRING(OldName,12)) WHERE OldName LIKE ("Volumes/raid%"); mysql> UPDATE filerename SET NewName=CONCAT("/raid", SUBSTRING(NewName,12)) WHERE NewName LIKE ("Volumes/raid%"); mysql> UPDATE failedpreview SET File=CONCAT("/raid", SUBSTRING(File,12)) WHERE File LIKE ("Volumes/raid%"); mysql> UPDATE volume SET Path=CONCAT("/raid", SUBSTRING(Path,12)) WHERE Path LIKE ("Volumes/raid%"); - Restart the dblogd process.
# /usr/etc/venture/bin/dblogd
-
The CONCAT command will take the new beginning of the path (the first argument; in this case, "/raid") and then continue with the end of the existing path, minus some characters at the beginning of the existing path. The number in the second SUBSTRING argument represents the character position from which to start copying the existing path. In this case, we will skip over the 12 characters in "Volumes/raid" and start with the 13th character.
So, for example, if the existing pathname was "Volumes/raid/job45678", this command would put "/raid" at the beginning of the new path and add the end of the existing path starting with the thirteenth character -- "/job45678" -- for a new path of "/raid/job45678."
Testing
Test moving an asset to a new folder within your Volume; the asset should retain the metadata assigned after being relocated.
Comments
0 comments
Please sign in to leave a comment.