New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DS-3789: postgreSQL-Script to im- and export the com. and coll. #1899
Conversation
This can preferably be used to create a basic data set for test and development systems, containing the same community-collection-tree as in the production system but without any individual-related data. | ||
|
||
### Preconditions | ||
* There exists (on the source as well as on the target server) a directory `/tmp/dspace-export`. On the source server must the user postgres be allowed to write to this directory. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the concept of these scripts overall. But, I wonder if there's a way to make the directory it writes to configurable? Perhaps even just writing the exported files to the current directory?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have to test this, but I think the current directory is something that should be doable. Before I invest more time into this, I'd like to know if this is going to be merged or not (see comments in the ticket and bellow).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code looks very useful, and I have had a need for this type of functionality in the past. However, I have some concerns about supporting this approach over time. These concerns are not with the specific implementation.
We have multiple ways to populate a test DSpace instance. (1)Dump and restore an entire database (2)Reconstitute a database instance with AIP export and import (3) Perform a selective data transfer via SQL (this example). Are there other approaches?
I think it would be worthwhile for the project to recommend test system creation strategies and provide recommendations for DSpace adopters. It would be interesting to provide importable data dumps for folks performing a test. From that discussion, a recommended implementation could be chosen.
My main concern is that we would be introducing another import/export method that will need to be maintained. Would there be a need to support import/export into different schema versions?
@terrywbrady Yes, we might to have to support this for future releases. But I think that is an easy task as not many tables are concerned here. Creating this once, collecting all information that matters, was probably most of the work and won't be necessary again. In the last years there would have bin two scenarios where this would have to be changed: DSpace 5.0's metadata for all feature, and the introduction of UUIDs in DSpace 6. I totally understand that we should discuss if we want to support this or if we say (like @cjuergen did in the issue comments) "AIP is the way to do that". I see enough differences between both approaches to support both. So I created the issue and the PR. But I could understand if the committers group would rather see this in DSpace-Labs or not in any official repository. For me it would be helpful to get concrete feedback regarding this question. |
I will create a repository "dspace-sql-scripts" as part of DSpace-Labs within the next days, following the discussion here and in the Jira issue. Regarding that, I close this PR. |
https://jira.duraspace.org/browse/DS-3789