The problem seems to be at the base of 6.3 (At this moment I don't know how the team's DBAs solved it when generating the dump), but we managed to start the migration, however during the migration it stopped and generated the following error (The 6.3 database this one being migrated had nothing added, it's the 6.3 core ):
-- Update the sequences > SELECT setval('cwf_workflowitem_seq', max(workflowitem_id)) FROM > cwf_workflowitem; > SELECT setval('cwf_collectionrole_seq', max(collectionrole_id)) FROM > cwf_collectionrole; > SELECT setval('cwf_workflowitemrole_seq', max(workflowitemrole_id)) FROM > cwf_workflowitemrole; > SELECT setval('cwf_pooltask_seq', max(pooltask_id)) FROM cwf_pooltask; > SELECT setval('cwf_claimtask_seq', max(claimtask_id)) FROM cwf_claimtask; > SELECT setval('cwf_in_progress_user_seq', max(in_progress_user_id)) FROM > cwf_in_progress_user; > ]; ERROR: duplicate key value violates unique constraint > "resourcepolicy_pkey" > Detalhe: Key (policy_id)=(1) already exists.; nested exception is > org.postgresql.util.PSQLException: ERROR: duplicate key value violates > unique constraint "resourcepolicy_pkey" > Detalhe: Key (policy_id)=(1) already exists. > at > org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:247) > at > org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:70) > at > org.springframework.jdbc.core.JdbcTemplate.translateException(JdbcTemplate.java:1541) > at > org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:393) > at > org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:431) > at > org.dspace.storage.rdbms.DatabaseUtils.executeSql(DatabaseUtils.java:1283) > ... 30 more > Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value > violates unique constraint "resourcepolicy_pkey" > Detalhe: Key (policy_id)=(1) already exists. > at > org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2676) > at > org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2366) > at > org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:356) > at > org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:496) > at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:413) > at > org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:333) > at > org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:319) > at > org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:295) > at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:290) > at > org.apache.commons.dbcp2.DelegatingStatement.execute(DelegatingStatement.java:193) > at > org.apache.commons.dbcp2.DelegatingStatement.execute(DelegatingStatement.java:193) > at > org.springframework.jdbc.core.JdbcTemplate$1ExecuteStatementCallback.doInStatement(JdbcTemplate.java:422) > at > org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:381) > ... 32 more > Em qui., 15 de jun. de 2023 às 15:22, DSpace Technical Support < dspace-tech@googlegroups.com> escreveu: > Hi, > > Those screenshots from the 6.3 database are definitely wrong. If all the > migrations are "Pending" that essentially means that either DSpace or > Flyway (the tool DSpace uses to auto-update your database) cannot tell that > your existing database has *any* tables. It seems to think you are > starting from an empty database. > > Are you sure you were able to successfully restore all the 6.3 database > content into your new database? > Or, maybe somehow your "schema_version" table in your 6.3 database is > *empty*? (That's the table which Flyway uses to manage all the migrations > that it knows it's already installed for you) > > It sounds to me like your data hasn't moved properly. DSpace is trying to > perform a "fresh install" on your 6.3 database, and that's obviously not > correct. So, something is wrong in the database's tables which is making > DSpace think that it needs to do a "fresh install" of all tables. > > Tim > > On Thursday, June 15, 2023 at 12:53:49 PM UTC-5 michel.m...@gmail.com > wrote: > >> DSPace 7.5 runs without error, if you do the pure installation, letting >> it create its base, without any previous base. >> See the command "dspace database info", everything *succeeds *and *runs >> normally*(Imagem 1 and 2) >> Image 1 >> [image: image.png] >> >> Image 2 >> [image: image.png] >> >> >> 7.5 worked (Empty)! >> I want to get the data (Dump) from Dspace 6.3 and add it here so as not >> to lose this information, how should I proceed? >> >> 1. Server 7.5 is up and running (No 6.3 data). >> 2. I need to take data from 6.3 and bring it to 7.5, how should I >> proceed in detail based on what was said above? >> >> >> Test: >> I changed the database to 6.3, then sent the command "dspace database >> info", and it said that* ALL versions are pending*.(Image 3 and 4). >> >> Image 3 >> [image: image.png] >> Image 4 >> [image: image.png] >> >> >> >> >> >> Em qui., 15 de jun. de 2023 às 12:41, DSpace Technical Support < >> dspac...@googlegroups.com> escreveu: >> >>> Unfortunately, we'd need more information to help out. It sounds like >>> the "./dspace database migrate ignored" script is attempting to run >>> migrations from DSpace version 1.1 on your database. That means it somehow >>> believes that you don't have a valid DSpace database at all? Or it somehow >>> thinks you are running DSpace 1.0 (which is really really odd, if you are >>> running 6.3). Maybe your pg_dump or pg_restore was missing some tables? >>> >>> You can try running "./dspace database info" to see what version of >>> DSpace the script believes that your database supports. It should say your >>> database is running 6.3... or that scripts through version 6.3 have already >>> been run. But, based on the error you shared, it sounds like it may say >>> something else entirely. >>> >>> Tim >>> >>> On Wednesday, June 14, 2023 at 9:00:40 AM UTC-5 michel.m...@gmail.com >>> wrote: >>> >>>> The command "./dspace database migrate ignored" does not work, it gives >>>> an error. What do I need to do to migrate ONLY the Data (Database) from 6.3 >>>> to 7.5? >>>> >>>> We follow these steps (To migrate ONLY the old database to the new one): >>>> * We did the PG_DUMP on the "dspace" ( Server 6.3) that has data and >>>> applied the PG_RESTORE from this base on the Server 7.5 dspace (The 7.5 >>>> Dspace was clean). Everything ran without error! >>>> * When applying the command [Server 7.5] "./dspace database migrate >>>> ignored", it gives an error. >>>> >>>> 1º) Error: >>>> SQL State : 42P07 >>>> Error Code : 0 >>>> Message : ERROR: relation "bitstreamformatregistry" already exists >>>> Location : >>>> org/dspace/storage/rdbms/sqlmigration/postgres/V1.1_Initial_DSpace_1.1_database_schema.sql >>>> (C:\dspace\file:\C:\dspace\lib\dspace-api-7.5.jar!\org\dspace\storage\rdbms\sqlmigration\postgres\V1.1_Initial_DSpace_1.1_database_schema.sql) >>>> Line : 90 >>>> >>>> 2º) Error: >>>> SQL State : 42723 >>>> Error Code : 0 >>>> Message : ERROR: function "getnextid" already exists with same >>>> argument types >>>> Location : >>>> org/dspace/storage/rdbms/sqlmigration/postgres/V1.1_Initial_DSpace_1.1_database_schema.sql >>>> (C:\dspace\file:\C:\dspace\lib\dspace-api-7.5.jar!\org\dspace\storage\rdbms\sqlmigration\postgres\V1.1_Initial_DSpace_1.1_database_schema.sql) >>>> Line : 46 >>>> >>>> >>>> >>>> Em sexta-feira, 2 de junho de 2023 às 18:43:21 UTC-3, Tim Donohue >>>> escreveu: >>>> >>>>> Hi Michel, >>>>> >>>>> We have a guide for migrating data at >>>>> https://wiki.lyrasis.org/display/DSDOC7x/Migrating+DSpace+to+a+new+server >>>>> >>>>> This should work even migrating data from an old 6.x instance to a new >>>>> 7.x one. >>>>> >>>>> Tim >>>>> ------------------------------ >>>>> *From:* dspac...@googlegroups.com <dspac...@googlegroups.com> on >>>>> behalf of Michel Montenegro <michel.m...@gmail.com> >>>>> *Sent:* Friday, June 2, 2023 10:17 AM >>>>> *To:* dspac...@googlegroups.com <dspac...@googlegroups.com> >>>>> *Subject:* Re: [dspace-tech] Migration Help from 6.3 to 7.5 >>>>> >>>>> I will detail our case: >>>>> we have version 6.3 (All data) and 7.5 (Clean) running on different >>>>> servers, we simply want to transfer only the data from version 6.3 to 7.5. >>>>> >>>>> We don't understand how to do that even from the documentation you >>>>> indicated (We had already seen it). What exactly do we need to do to >>>>> export >>>>> the data from 6.3 to 7.5? (Assuming 7.5 is running, but it's a clean >>>>> install and all the data we want is in 6.3) >>>>> >>>>> Em sex., 2 de jun. de 2023 às 11:23, Mark H. Wood <mwood...@gmail.com> >>>>> escreveu: >>>>> >>>>> On Thu, Jun 01, 2023 at 10:40:44PM -0300, Michel Montenegro wrote: >>>>> > Where can I find documentation that shows how to migrate from 6.3 to >>>>> 7.5 or >>>>> > how we can migrate? >>>>> > >>>>> > All documentation I found was out of date or apparently incomplete. >>>>> >>>>> The official upgrade documentation is at: >>>>> >>>>> https://wiki.lyrasis.org/display/DSDOC7x/Upgrading+DSpace >>>>> >>>>> If that is incorrect or incomplete, please tell us about the specific >>>>> problem(s) you found. >>>>> >>>>> -- >>>>> Mark H. Wood >>>>> Lead Technology Analyst >>>>> >>>>> University Library >>>>> Indiana University - Purdue University Indianapolis >>>>> 755 W. Michigan Street >>>>> Indianapolis, IN 46202 >>>>> 317-274-0749 <(317)%20274-0749> >>>>> www.ulib.iupui.edu >>>>> >>>>> -- >>>>> All messages to this mailing list should adhere to the Code of >>>>> Conduct: https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx >>>>> --- >>>>> You received this message because you are subscribed to the Google >>>>> Groups "DSpace Technical Support" group. >>>>> To unsubscribe from this group and stop receiving emails from it, send >>>>> an email to dspace-tech...@googlegroups.com. >>>>> To view this discussion on the web visit >>>>> https://groups.google.com/d/msgid/dspace-tech/ZHn7eYw0me8tLAx1%40IUPUI.Edu >>>>> . >>>>> >>>>> >>>>> >>>>> -- >>>>> Atenciosamente, >>>>> *Michel Pinheiro Montenegro* >>>>> - *Bacharel* em Sistema de Informação >>>>> - [Lato Sensu] *Especialista* em Engenharia de Sistemas >>>>> - [Stricto Sensu] *Mestre* em Ciência da Computação >>>>> - [Stricto Sensu] *Doutorando* em Ciência da Computação >>>>> >>>>> E-mail/Gtalk: michel.m...@gmail.com >>>>> >>>>> -- >>>>> All messages to this mailing list should adhere to the Code of >>>>> Conduct: https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx >>>>> --- >>>>> You received this message because you are subscribed to the Google >>>>> Groups "DSpace Technical Support" group. >>>>> To unsubscribe from this group and stop receiving emails from it, send >>>>> an email to dspace-tech...@googlegroups.com. >>>>> To view this discussion on the web visit >>>>> https://groups.google.com/d/msgid/dspace-tech/CADOAx_jWiA6dkU7O0BSU7BNe0RBek33uCwf3znNXidcBiCZ_og%40mail.gmail.com >>>>> <https://groups.google.com/d/msgid/dspace-tech/CADOAx_jWiA6dkU7O0BSU7BNe0RBek33uCwf3znNXidcBiCZ_og%40mail.gmail.com?utm_medium=email&utm_source=footer> >>>>> . >>>>> >>>> -- >>> All messages to this mailing list should adhere to the Code of Conduct: >>> https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx >>> --- >>> You received this message because you are subscribed to the Google >>> Groups "DSpace Technical Support" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to dspace-tech...@googlegroups.com. >>> >> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/dspace-tech/d10366d0-48db-47e7-96fd-b91e014be905n%40googlegroups.com >>> <https://groups.google.com/d/msgid/dspace-tech/d10366d0-48db-47e7-96fd-b91e014be905n%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> >> >> >> -- >> Atenciosamente, >> *Michel Pinheiro Montenegro* >> - *Bacharel* em Sistema de Informação >> - [Lato Sensu] *Especialista* em Engenharia de Sistemas >> - [Stricto Sensu] *Mestre* em Ciência da Computação >> - [Stricto Sensu] *Doutorando* em Ciência da Computação >> >> E-mail/Gtalk: michel.m...@gmail.com >> > -- > All messages to this mailing list should adhere to the Code of Conduct: > https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx > --- > You received this message because you are subscribed to the Google Groups > "DSpace Technical Support" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to dspace-tech+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/dspace-tech/687b0fd8-b1cd-44fc-a8ce-5d65301e544en%40googlegroups.com > <https://groups.google.com/d/msgid/dspace-tech/687b0fd8-b1cd-44fc-a8ce-5d65301e544en%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- Atenciosamente, *Michel Pinheiro Montenegro* - *Bacharel* em Sistema de Informação - [Lato Sensu] *Especialista* em Engenharia de Sistemas - [Stricto Sensu] *Mestre* em Ciência da Computação - [Stricto Sensu] *Doutorando* em Ciência da Computação E-mail/Gtalk: michel.montene...@gmail.com -- All messages to this mailing list should adhere to the Code of Conduct: https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx --- You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group. To unsubscribe from this group and stop receiving emails from it, send an email to dspace-tech+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/CADOAx_ja6s8KN%2B5PdD36KDESW%2BeKw00_3rtamwQ8hwmLM9sGiA%40mail.gmail.com.