Hi Alessio, I’m using version 2.16, and I was able to get the restore to work using the settings you advised and the REST API rather than the web UI. I didn’t realize that the backup/restore was only for configuration though, so I guess I’ll have to copy the data over manually anyways. Thanks for your help.
> On May 15, 2020, at 3:53 PM, Alessio Fabiani > <alessio.fabi...@geo-solutions.it> wrote: > > Hi Alec, > which version of GeoServer are you using? > > Also I strongly suggest to use the backup plugin from here: > > http://maven.geo-solutions.it/org/geoserver/community/gs-backup-restore/ > <http://maven.geo-solutions.it/org/geoserver/community/gs-backup-restore/> > > those ones are the most updated ones. Unfortunately the GeoServer automatic > build does not re-build Community plugins. > > That said, I also suggest to issue the backup and restore via REST interface > and passing the following variables > > BK_SKIP_SECURITY=true > BK_SKIP_SETTINGS=true > > warning: Backup/Restore plugin restores configuration but not data. You will > need to move the layer data / table manually anyway. > > > > > > Il giorno ven 15 mag 2020 alle ore 23:02 Alec Peters via Geoserver-users > <geoserver-users@lists.sourceforge.net > <mailto:geoserver-users@lists.sourceforge.net>> ha scritto: > Hello, > > I’m trying to move a layer from one Geoserver instance to another. Both > instances have the same security settings (I literally copied the security > folder over). I ran the backup plugin, and then attempted to restore that > backup archive into the new instance. I get the error listed below. The error > is occurring in the > org.geoserver.security.GeoServerSecurityManager.migrateFrom21 method, which > seems strange to me because my security version.properties file is clearly > indicating version 2.5: > > #Current version of the security directory. Do not remove or alter this file > #Tue Oct 08 00:30:16 UTC 2019 > version=2.5 > > So it seems to me that migrateFrom21 should never be called. Looking at the > code of org.geoserver.security.GeoServerSecurityManager.getSecurityVersion, I > see that BASE_VERSION is 2.1, so I’m guessing that BASE_VERSION is being > returned instead of the correct version, but I’m unable to figure out why it > is not loading the security version properly. Everything else seems to be > working fine. Any help would be appreciated. > > Stacktrace: > 2020-05-15 18:42:07,982 ERROR > [org.springframework.batch.core.step.AbstractStep] - Encountered an error > executing step restoreGeoServerSecurityManager in job restoreJob > java.util.concurrent.ExecutionException: > org.springframework.batch.core.UnexpectedJobExecutionException: Exception > occurred while storing GeoServer security and services settings! > at > java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122) > at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191) > at > org.geoserver.backuprestore.tasklet.AbstractCatalogBackupRestoreTasklet.execute(AbstractCatalogBackupRestoreTasklet.java:226) > at > org.springframework.batch.core.step.tasklet.TaskletStep$ChunkTransactionCallback.doInTransaction(TaskletStep.java:406) > at > org.springframework.batch.core.step.tasklet.TaskletStep$ChunkTransactionCallback.doInTransaction(TaskletStep.java:330) > at > org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140) > at > org.springframework.batch.core.step.tasklet.TaskletStep$2.doInChunkContext(TaskletStep.java:271) > at > org.springframework.batch.core.scope.context.StepContextRepeatCallback.doInIteration(StepContextRepeatCallback.java:81) > at > org.springframework.batch.repeat.support.RepeatTemplate.getNextResult(RepeatTemplate.java:374) > at > org.springframework.batch.repeat.support.RepeatTemplate.executeInternal(RepeatTemplate.java:215) > at > org.springframework.batch.repeat.support.RepeatTemplate.iterate(RepeatTemplate.java:144) > at > org.springframework.batch.core.step.tasklet.TaskletStep.doExecute(TaskletStep.java:257) > at > org.springframework.batch.core.step.AbstractStep.execute(AbstractStep.java:200) > at > org.springframework.batch.core.job.SimpleStepHandler.handleStep(SimpleStepHandler.java:148) > at > org.springframework.batch.core.job.flow.JobFlowExecutor.executeStep(JobFlowExecutor.java:64) > at > org.springframework.batch.core.job.flow.support.state.StepState.handle(StepState.java:67) > at > org.springframework.batch.core.job.flow.support.SimpleFlow.resume(SimpleFlow.java:169) > at > org.springframework.batch.core.job.flow.support.SimpleFlow.start(SimpleFlow.java:144) > at > org.springframework.batch.core.job.flow.FlowJob.doExecute(FlowJob.java:134) > at > org.springframework.batch.core.job.AbstractJob.execute(AbstractJob.java:306) > at > org.springframework.batch.core.launch.support.SimpleJobLauncher$1.run(SimpleJobLauncher.java:135) > at > org.springframework.core.task.SimpleAsyncTaskExecutor$ConcurrencyThrottlingRunnable.run(SimpleAsyncTaskExecutor.java:275) > at java.base/java.lang.Thread.run(Thread.java:834) > Caused by: org.springframework.batch.core.UnexpectedJobExecutionException: > Exception occurred while storing GeoServer security and services settings! > at > org.geoserver.backuprestore.tasklet.CatalogSecurityManagerTasklet.doExecute(CatalogSecurityManagerTasklet.java:147) > at > org.geoserver.backuprestore.tasklet.AbstractCatalogBackupRestoreTasklet$4.call(AbstractCatalogBackupRestoreTasklet.java:207) > at > org.geoserver.backuprestore.tasklet.AbstractCatalogBackupRestoreTasklet$4.call(AbstractCatalogBackupRestoreTasklet.java:203) > at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) > ... 1 more > Caused by: java.lang.RuntimeException: > org.geoserver.security.xml.XMLSecurityConfigException: Password policy > default already exists > at > org.geoserver.security.GeoServerSecurityManager.reload(GeoServerSecurityManager.java:415) > at > org.geoserver.backuprestore.tasklet.CatalogSecurityManagerTasklet.doExecute(CatalogSecurityManagerTasklet.java:141) > ... 4 more > Caused by: org.geoserver.security.xml.XMLSecurityConfigException: Password > policy default already exists > at > org.geoserver.security.xml.XMLSecurityConfigValidator.createSecurityException(XMLSecurityConfigValidator.java:177) > at > org.geoserver.security.validation.SecurityConfigValidator.validateAddNamedService(SecurityConfigValidator.java:322) > at > org.geoserver.security.validation.SecurityConfigValidator.validateAddPasswordPolicy(SecurityConfigValidator.java:355) > at > org.geoserver.security.GeoServerSecurityManager.savePasswordPolicy(GeoServerSecurityManager.java:1083) > at > org.geoserver.security.GeoServerSecurityManager.migrateFrom21(GeoServerSecurityManager.java:2133) > at > org.geoserver.security.GeoServerSecurityManager.reload(GeoServerSecurityManager.java:399) > ... 5 more > > _______________________________________________ > Geoserver-users mailing list > > Please make sure you read the following two resources before posting to this > list: > - Earning your support instead of buying it, but Ian Turton: > http://www.ianturton.com/talks/foss4g.html#/ > <http://www.ianturton.com/talks/foss4g.html#/> > - The GeoServer user list posting guidelines: > http://geoserver.org/comm/userlist-guidelines.html > <http://geoserver.org/comm/userlist-guidelines.html> > > If you want to request a feature or an improvement, also see this: > https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer > > <https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer> > > > Geoserver-users@lists.sourceforge.net > <mailto:Geoserver-users@lists.sourceforge.net> > https://lists.sourceforge.net/lists/listinfo/geoserver-users > <https://lists.sourceforge.net/lists/listinfo/geoserver-users> > > > -- > == > GeoServer Professional Services from the experts! Visit http://goo.gl/it488V > <http://goo.gl/it488V> for more information. > == > Ing. Alessio Fabiani > @alfa7691 > Founder/Technical Lead > > GeoSolutions S.A.S. > Via di Montramito 3/A - 55054 Massarosa (LU) - Italy > phone: +39 0584 962313 > fax: +39 0584 1660272 > mob: +39 331 6233686 > > http://www.geo-solutions.it <http://www.geo-solutions.it/> > http://twitter.com/geosolutions_it <http://twitter.com/geosolutions_it> > ------------------------------------------------------- > Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE > 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa > che ogni circostanza inerente alla presente email (il suo contenuto, gli > eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i > destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per > errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei > comunque grato se potesse darmene notizia. > > This email is intended only for the person or entity to which it is addressed > and may contain information that is privileged, confidential or otherwise > protected from disclosure. We remind that - as provided by European > Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or > the information herein by anyone other than the intended recipient is > prohibited. If you have received this email by mistake, please notify us > immediately by telephone or e-mail.
_______________________________________________ Geoserver-users mailing list Please make sure you read the following two resources before posting to this list: - Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/ - The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users