<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Sep 22, 2015, at 10:35 AM, Levy, Michael <<a href="mailto:mlevy@ushmm.org" class="">mlevy@ushmm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="">Let's say, hypothetically, that one has entered some test resources into ArchivesSpace and in the fullness of time those test data grew, and then one takes a look at what one has and thinks, hmm, it would be nice to migrate from Derby to MySQL. In this hypothetical scenario, what advice would you give? Find a way to export and import the Derby table data to the empty MySQL database created at install? Are there better export/import functions provided by ArchivesSpace? </div><div class=""><br class=""></div><div class="">We know now to avoid production data in Derby.</div>
</div></div></blockquote><br class=""></div><div><br class=""></div><div>For resource trees you can export and import as EAD. </div><div>Barcodes do not export/import with the standard EAD converters, but I have a plugin to handle those if needed. I haven’t noticed anything else missing from the export, but I would suggest that you compare old and new versions before decommissioning the old demo server. </div><div><br class=""></div><div>I’ve moved other models like user and repository info using the backend API. </div><div>Just save the JSON output from a GET and use it as data on a POST to the new server backend.</div><div><br class=""></div><div>I haven’t tried moving subjects or agents. You could probably use the backend API. </div><div>I would probably just reimport using LSNAF/LCSH. </div><div><br class=""></div><div>How much and what material do you have to move ? </div><div><br class=""></div><div>In theory, you should be able to do it with SQL, but I suspect bridging the differences between Derby and MySQL would be more work that the above.  If you want to give that route a try, you can download the Apache derby distribution, which has some command line programs you can use to dump the archivesspace derby db, but it doesn’t appear as simple as doing a mysqldump and reloading it.  You might have better luck dumping to CSV than SQL. By creating a properties file that points to the ArchivesSpace derby db in build/ directory, I was able to connect with derby’s ‘ij’ and do a ‘select * from RESOURCE;’ </div><div><br class=""></div><div><br class=""></div><div>Googleing for ‘derby mysqldump equivalent’ comes up with this suggestion: </div><div><br class=""></div><div><a href="http://stackoverflow.com/questions/3751425/mysql-dump-sql-script-and-import-to-an-apache-derby" class="">http://stackoverflow.com/questions/3751425/mysql-dump-sql-script-and-import-to-an-apache-derby</a></div><div><br class=""></div><div><a href="http://dbcopyplugin.sourceforge.net" class="">http://dbcopyplugin.sourceforge.net</a></div><div><br class=""></div><div><br class=""></div><div><br class=""></div><div>— Steve. </div><div><br class=""></div></body></html>