Best way to create a clone of a Geonetwork instance?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Best way to create a clone of a Geonetwork instance?

Steffen Reichel
Hi!

I have a running production instance of Geonetwork (Version 3.4.3 using
the official Docker image with Postgres database backend inside
Kubernetes). For testing purposes I'd like to create a clone of it -
including all users and data directory. What is the best / recommended
way to do that? At the moment I'm thinking doing something like

Clone database "geonetwork"
Clone data-disk
Create new RC for my test instance
Run batch edit to rewrite the local URLs from "prod.mydomain.com" to
"test.mydomain.com"

I was wondering, if there is an easier way of doing this. As this will
be a regular task, I'd like to have it as automated as possible.
Something like creating a fresh installation and do something similar to
a harvest from production instance. The harvester itself does not help,
as this is not replicating users and data. Is there a functionality like
that that I have overlooked?

Cheers,
Steffen


_______________________________________________
GeoNetwork-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork
Reply | Threaded
Open this post in threaded view
|

Re: Best way to create a clone of a Geonetwork instance?

Jose Garcia
Hi Steffen

About the last step, if you update in the settings the server host name (
http://SERVER/geonetwork/srv/eng/admin.console#/settings?scrollTo=%23gn-settings-spy-target-0-2),
should appear a button to update the host name in the metadata records.

An option, that I think can be easier to automate, is to create a fresh
install and do an export/import of the database. If the export is text
based, could be processed by grep or similar tool to replace the server
host name from prod to dev.

Regards,
Jose García

On Wed, Oct 24, 2018 at 10:11 PM Steffen Reichel <[hidden email]>
wrote:

> Hi!
>
> I have a running production instance of Geonetwork (Version 3.4.3 using
> the official Docker image with Postgres database backend inside
> Kubernetes). For testing purposes I'd like to create a clone of it -
> including all users and data directory. What is the best / recommended
> way to do that? At the moment I'm thinking doing something like
>
> Clone database "geonetwork"
> Clone data-disk
> Create new RC for my test instance
> Run batch edit to rewrite the local URLs from "prod.mydomain.com" to
> "test.mydomain.com"
>
> I was wondering, if there is an easier way of doing this. As this will
> be a regular task, I'd like to have it as automated as possible.
> Something like creating a fresh installation and do something similar to
> a harvest from production instance. The harvester itself does not help,
> as this is not replicating users and data. Is there a functionality like
> that that I have overlooked?
>
> Cheers,
> Steffen
>
>
> _______________________________________________
> GeoNetwork-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/geonetwork-users
> GeoNetwork OpenSource is maintained at
> http://sourceforge.net/projects/geonetwork
>


--













*Vriendelijke groeten / Kind regards,Jose García
<http://www.geocat.net/>Veenderweg 136721 WD BennekomThe NetherlandsT: +31
(0)318 416664 <+31318416664> <https://www.facebook.com/geocatbv>
<https://twitter.com/geocat_bv>
<https://plus.google.com/u/1/+GeocatNetbv/posts>Please consider the
environment before printing this email.*

_______________________________________________
GeoNetwork-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork
Reply | Threaded
Open this post in threaded view
|

Re: Best way to create a clone of a Geonetwork instance?

Jean Pommier - PI geosolutions
Hi,

To replace the server name, you can also directly run the request in the
database. For instance, in postgreSQL

psql -U [user] -h [host] -d [db] -c "update metadata set
data=replace(data,'prod.mydomain.com','test.mydomain.com');"

Easy to automate...

Jean

*Jean Pommier -- pi-Geosolutions*

Ingénieur, consultant indépendant

Tél. : (+33) 6 09 23 21 36
E-mail : [hidden email]
Web : www.pi-geosolutions.fr

Le 25/10/2018 à 08:40, Jose Garcia a écrit :

> Hi Steffen
>
> About the last step, if you update in the settings the server host name (
> http://SERVER/geonetwork/srv/eng/admin.console#/settings?scrollTo=%23gn-settings-spy-target-0-2),
> should appear a button to update the host name in the metadata records.
>
> An option, that I think can be easier to automate, is to create a fresh
> install and do an export/import of the database. If the export is text
> based, could be processed by grep or similar tool to replace the server
> host name from prod to dev.
>
> Regards,
> Jose García
>
> On Wed, Oct 24, 2018 at 10:11 PM Steffen Reichel <[hidden email]>
> wrote:
>
>> Hi!
>>
>> I have a running production instance of Geonetwork (Version 3.4.3 using
>> the official Docker image with Postgres database backend inside
>> Kubernetes). For testing purposes I'd like to create a clone of it -
>> including all users and data directory. What is the best / recommended
>> way to do that? At the moment I'm thinking doing something like
>>
>> Clone database "geonetwork"
>> Clone data-disk
>> Create new RC for my test instance
>> Run batch edit to rewrite the local URLs from "prod.mydomain.com" to
>> "test.mydomain.com"
>>
>> I was wondering, if there is an easier way of doing this. As this will
>> be a regular task, I'd like to have it as automated as possible.
>> Something like creating a fresh installation and do something similar to
>> a harvest from production instance. The harvester itself does not help,
>> as this is not replicating users and data. Is there a functionality like
>> that that I have overlooked?
>>
>> Cheers,
>> Steffen
>>
>>
>> _______________________________________________
>> GeoNetwork-users mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/geonetwork-users
>> GeoNetwork OpenSource is maintained at
>> http://sourceforge.net/projects/geonetwork
>>
>


_______________________________________________
GeoNetwork-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork