File path stored in bitstream table - v4.3

273 views
Skip to first unread message

Vinicius Assef

unread,
Jul 11, 2016, 1:39:57 PM7/11/16
to dspace-c...@googlegroups.com
Hey guys.

I will have to move my DSpace 4.3 instance to another path. Currently its home is /var/lib/tomcat7/myinstance and I will move it to /userdata/dspace/myinstance

I saw the table `bitstream` stores the full file path in `source` column. So, there's my question:

Will I have to keep the `bistream.source` contents up to date with the real bitstreams' location in filesystem?

Thank you in advance.

--
Vinicius Assef.

Tim Donohue

unread,
Jul 14, 2016, 12:27:43 PM7/14/16
to Vinicius Assef, dspace-c...@googlegroups.com

Hi Vinicius,

In the database, all paths to bitstreams are *relative* to the configured "dspace.dir" location (in your dspace.cfg).  So, if you move your DSpace installation, just be sure to update your "dspace.dir" configuration to the new location.  After that, bitstreams should be found under their new location.

Tim

--
You received this message because you are subscribed to the Google Groups "DSpace Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dspace-communi...@googlegroups.com.
To post to this group, send email to dspace-c...@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-community.
For more options, visit https://groups.google.com/d/optout.

-- 
Tim Donohue
Technical Lead for DSpace & DSpaceDirect
DuraSpace.org | DSpace.org | DSpaceDirect.org

Vinicius Assef

unread,
Jul 14, 2016, 6:49:17 PM7/14/16
to dspace-c...@googlegroups.com
Hi Tim, thank you for answering.

I took a second look and I've just confirmed this situation:
  1. The `bitstream.source` column has the full path pointing to the upload folder, including filename. E.g., `/var/lib/tomcat7/myrepo/upload/some-filename.pdf`
  2. The upload directory is almost empty. Just a few files there. :-/

I think this column has no impact after the bitstream has being added to the application, because currently I can access all bitstreams from inside DSpace, even if the source file doesn't exist in upload folder anymore.

So, I won't need to update anything when moving around to the new server.

Am I wrong? Am I right?

BTW, I'm using DSpace 4.3.

Thanks in advance.

--
Vinicius Assef.


Tim Donohue

unread,
Jul 15, 2016, 10:05:52 AM7/15/16
to Vinicius Assef, dspace-c...@googlegroups.com

Hi Vinicius,

The "bitstream.source" column is simply used as provenance metadata, essentially it's a record of where the bitstream came from and what it's initial name was.  It is not used to store or locate the file/bitstream after it is uploaded into DSpace.

After a file is uploaded into DSpace, the *internal_id* actually represents its location on the filesystem.  The internal_id column looks like a random set of numbers, but it actually represents the relative path of the file within the [dspace.dir]/assetstore/ folder

As a basic example, if the internal_id was 123456789, the DSpace would look for that file at [dspace.dir]/assetstore/12/34/56/123456789

More information on how Bitstreams are stored in DSpace and referenced by the "internal_id" column is available at:

https://wiki.duraspace.org/display/DSDOC4x/Storage+Layer#StorageLayer-BitstreamStore

So, the simple answer here is that, after moving your entire [dspace.dir] folder (and subfolders) to the new location, all you should need to update is the "dspace.dir" setting in your dspace.cfg. After that, DSpace will find all your files automatically under the [dspace.dir]/assetstore/ folder.

- Tim

Vinicius Assef

unread,
Jul 15, 2016, 12:56:28 PM7/15/16
to Tim Donohue, dspace-c...@googlegroups.com
Thank you very much, Tim.

--
Vinicius Assef.
Reply all
Reply to author
Forward
0 new messages