Please Use Caution
The preferred and supported way to move a blob store can be found in our help documentation.
These steps in this article should in general be avoided if at all possible and are provided as is.
These steps should not be used if you are running a high-availability cluster or any other database than OrientDB.
If you're already running Nexus Repository 3 in an HA cluster contact support for information about moving blob stores.
Advanced Procedure to Move a Blobstore - Use at your own risk
The steps below allow you to move blob stores, with all data intact. In addition to moving the blob store directory ('sample
', in the examples below), you are required to change a blob store definition in the OrientDB config database so that it points to a different location.
- Shut down your Nexus Repository 3 first.
Any connection to an OrientDB while in use by a different process will corrupt the database. - Back up your data directory.
- Move the specified blob store directory to its new location, e.g.
mv /sonatype-work/nexus3/blobs/sample /new/blobstore/location/
. The blob store location should have file "metadata.properties" at its root when this is done, and a directory of "content" as a sibling to that file. - Access the OrientDB console as described here ( have you shut down Repo 3 yet? ):
Accessing the OrientDB Console - Enter these commands:
connect plocal:../sonatype-work/nexus3/db/config admin admin
update repository_blobstore set attributes.file.path='/new/blobstore/location/sample' where name='sample'
disconnect
exit
About File Paths: While connected to the OrientDB console, always use forward slashes, even on Windows OS.
- Start up the Nexus Repository 3.
- Log into the Nexus Repository 3 with your username and password.
- Click '
sample
', from the Blob Stores screen in the Administration menu to view the new location of the blob store you configured in the OrientDB console (i.e./new/blobstore/location/sample
).