<div dir="ltr">Using the following command from geonode folder will allow you to dump the whole DB<div><br></div><div>python manage.py dumpdata --natural --indent=2 --exclude=contenttypes --exclude=sessions.Session > dump.json<br></div><div><br></div><div>If you want to dump only the Layers you can use something like </div><div><br></div><div>python manage.py dumpdata --natural --indent=2 --exclude=contenttypes --exclude=sessions.Session layers > layers.json<br></div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><div style="font-size:12.8px">Best Regards,</div><div style="font-size:12.8px">Alessio Fabiani.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><div>==</div><div>GeoServer Professional Services from the experts!</div><div>Visit <a href="http://goo.gl/it488V" target="_blank">http://goo.gl/it488V</a> for more information.</div><div>==</div></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Ing. Alessio Fabiani</div><div style="font-size:12.8px">@alfa7691</div><div style="font-size:12.8px">Founder/Technical Lead</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><div>GeoSolutions S.A.S.</div><div>Via di Montramito 3/A</div><div>55054 Massarosa (LU)</div><div>Italy</div><div>phone: +39 0584 962313</div><div>fax: +39 0584 1660272</div><div>mob: +39 331 6233686</div><div><br></div><div><a href="http://www.geo-solutions.it" target="_blank">http://www.geo-solutions.it</a></div><div><a href="http://twitter.com/geosolutions_it" target="_blank">http://twitter.com/geosolutions_it</a></div></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">-------------------------------------------------------</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><p><span lang="IT"><font size="1"><b>AVVERTENZE AI SENSI DEL D.Lgs. 196/2003</b></font></span></p><p><span lang="IT"><font size="1">Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.</font></span></p><p><span lang="IT"><font size="1"> </font></span></p><p><font size="1">The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.</font></p><p><font size="1">---------------------------------------------------------------------</font></p></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On Wed, Feb 24, 2016 at 2:52 PM, Daniel Victoria <span dir="ltr"><<a href="mailto:daniel.victoria@gmail.com" target="_blank">daniel.victoria@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Hi Alessio,<br><br></div>Good to know this export/import feature is being investigated. Will be a nice addition. As for your suggestion, where can I get the layers JSon? Directily from the database? I'm more of a user than a developer.<br><br></div>Thanks<br></div>Daneil<br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 24, 2016 at 8:15 AM, Alessio Fabiani <span dir="ltr"><<a href="mailto:alessio.fabiani@geo-solutions.it" target="_blank">alessio.fabiani@geo-solutions.it</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Dear Daniel,<div>as part of the Backup&Restore procedure I am investigating a way to export/import part of the GeoNode data.</div><div><br></div><div>WARNING: All this work is in progress, so at this time there is nothing ready to use.</div><div><br></div><div>The idea is the following one:</div><div><br></div><div>1. Providing to the user a management command to backup the GeoNode catalog. The whole catalog or part of it.</div><div><br></div><div>- This will make use of the "fixtures" and there should be a way to provide somehow a query or a list of keys to store a subset of the layers.</div><div>- Backup the GeoServer data.</div><div><br></div><div>2. Providing to the user a management command to restore the GeoNode catalog. The whole catalog or part of it.</div><div><br></div><div>- The command will use saved fixtures to restore GeoNode data.</div><div>- Restore the GeoServer data.</div><div><br></div><div><br></div><div>As a first implementation there will be the possibility to save the whole catalog as a set of Json fixtures.</div><div><br></div><div>For you specific use case, the possibility would be to take the Layers JSON and preserve "only" the layers you want to restore.</div><div><br></div><div>On GeoServer side you will need to get the layers data manually. This is possible simply by getting the files from the GEOSERVER_DATA_DIRECTORY:</div><div><br></div><div> - Get the saved shapefiles from the upload subfolder</div><div> - Get the catalog metadata from workspace/geonode subfolder</div><div> - Get the styles SLDs and XMLs from styles subfolder</div><div> - Reload the catalog from the admin interface or restart GeoServer.</div><div><br></div></div><div class="gmail_extra"><br clear="all"><div><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><div style="font-size:12.8px">Best Regards,</div><div style="font-size:12.8px">Alessio Fabiani.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><div>==</div><div>GeoServer Professional Services from the experts!</div><div>Visit <a href="http://goo.gl/it488V" target="_blank">http://goo.gl/it488V</a> for more information.</div><div>==</div></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Ing. Alessio Fabiani</div><div style="font-size:12.8px">@alfa7691</div><div style="font-size:12.8px">Founder/Technical Lead</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><div>GeoSolutions S.A.S.</div><div>Via di Montramito 3/A</div><div>55054 Massarosa (LU)</div><div>Italy</div><div>phone: <a href="tel:%2B39%200584%20962313" value="+390584962313" target="_blank">+39 0584 962313</a></div><div>fax: <a href="tel:%2B39%200584%201660272" value="+3905841660272" target="_blank">+39 0584 1660272</a></div><div>mob: <a href="tel:%2B39%20331%206233686" value="+393316233686" target="_blank">+39 331 6233686</a></div><div><br></div><div><a href="http://www.geo-solutions.it" target="_blank">http://www.geo-solutions.it</a></div><div><a href="http://twitter.com/geosolutions_it" target="_blank">http://twitter.com/geosolutions_it</a></div></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">-------------------------------------------------------</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><p><span lang="IT"><font size="1"><b>AVVERTENZE AI SENSI DEL D.Lgs. 196/2003</b></font></span></p><p><span lang="IT"><font size="1">Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.</font></span></p><p><span lang="IT"><font size="1"> </font></span></p><p><font size="1">The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.</font></p><p><font size="1">---------------------------------------------------------------------</font></p></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote"><div><div>On Tue, Feb 23, 2016 at 8:44 PM, Daniel Victoria <span dir="ltr"><<a href="mailto:daniel.victoria@gmail.com" target="_blank">daniel.victoria@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr"><div><div><div><div><div><div>We have a GeoNode instance with more than 1000 layers published. We'd like to have a seccond GeoNode site with only some of the layers published in the first site, around 100. So far we've though of two ways to do this:<br></div>1) install a clean GeoNode and manually register the 100 layers<br></div>2) Copy the GeoNode with 1000 layers and manually delete the 900 excess layers<br><br></div>The first option sound better, specially if we use the importlayers command. But can I import the metadata with the importlayers commad?<br><br></div>Are there any other options?<br><br></div>Thanks<span><font color="#888888"><br></font></span></div><span><font color="#888888">Daniel<br></font></span></div>
<br></div></div>_______________________________________________<br>
geonode-users mailing list<br>
<a href="mailto:geonode-users@lists.osgeo.org" target="_blank">geonode-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/geonode-users" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/geonode-users</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
geonode-users mailing list<br>
<a href="mailto:geonode-users@lists.osgeo.org">geonode-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/geonode-users" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/geonode-users</a><br>
<br></blockquote></div><br></div>