====== Update the databases via XML Export ====== For an update of all databases apart from vl_literature (images, technology, experiments, people, movies) the procedure is very similar the one given in [[library_xml_update|How to update the LITERATURE database]]. But it differs in three respects: You mostly cannot use buttons for the update, so that it is a little bit more technical, you do not have to update the Zope library (one step less) and it will take you much less time because the other databases do not contain as many records as vl_literature does. See [[library_xml_update|How to update the LITERATURE database]], too, for background information on understanding what happens when you are doing an update. \\ :!: **Remember**: All databases (apart from vl_literature) relate to images from the vl_images database. If you have changed or created a record e.g. in the vl_technology database and this change concerns a new image, the vl_images database has to be up to date, too. Otherwise the website will return an error message instead of a data sheet (e.g. in the technology section). ===== 1. Data export from FileMaker ===== Export all records from the database you want to update into an XML file. In **vl_images** you can choose //XML_export// from the menu in FileMaker/Scripts. The script will create a file //vl_literature.xml// in your FileMaker application folder (HD/Applications/FileMaker/vl-literature). This will take about 10 min. For **all other databases** you have to do the XML-export "by hand": Choose Ablage/Datensätze exportieren from the FileMaker menu and name the file, you are going to export, //vl_[database name].xml// (//vl_technology.xml, vl_experiments.xml//...). Choose the folder HD/Applications/FileMaker/ as the directory to store your exportfile in. The export format has to be XML. You will be asked about the grammar, choose FMPXMLRESULT from the popoup menu and leave the style-sheet question unmarked. The next window will ask you which fields to export, copy them all to the right column. Click export, a window will appear showing the process. ===== 2. Database update (data import into the PostgreSQL database) ===== Open a browser and go to the [[http://vlp.mpiwg-berlin.mpg.de/intranet|VLP's Intranet section]] (Username: vlp, password: Standard) and choose "Site administration" from the list on the left. Upload the xml-file (e.g.//vl-technology//) you just exported from FileMaker with the help of the first button ("Choose"/"Durchsuchen") on that page. Then make sure that you chose the right database from the popup menu to apply the exportfile to: You can only update the technology database vl_technology with the exported file //vl_technology.xml//, vl_images only with //vl_images.xml// ... etc. \\ :!: If you try to update one of those databases with the wrong exportfile, serious data loss will be the result, so take care! \\ After having chosen the right database, you can click "Update the database". A list will appear and in quite short time it should be fully loaded and say "DONE!" at its end. **Do not close the window** until "Done" is displayed. ((There is also another way of updating the database, instead of using the buttons in the VLP. But this is an alternative and unsupported way. It is described here only for the purpose of better understanding of the update procedures. If you need this alternative anyway, please contact **Robert Casties, Tel. -342** before. \\ **//1. Copying the XML export file to the xserve02 server://** Mount the **xserve02** server using your MPIWG standard user name (your email name) and your standard password and choose your account from the list of shares. Copy the XML export file to your home directory on the xserve02. \\ **//2. Importing the data to the PostgreSQL database (Terminal)://** Use the Terminal application to connect to the xserve02: \\ //ssh -l yourUsername xserve02// \\ You will be asked for your standard MPIWG password when connecting for the first time, please agree to add the server to your local server list. When connected, call the import script with the export file name as the only argument: \\ ///usr/local/bin/vlp-updatedb.sh vl_literature.xml// \\ The script will start the import of the records, indicating the progress with INFO messages. \\ **Important: Please do not close the Terminal window during this process, this will stop the import.**)) The update is done now, **please check**, if all new images and data sheets function as you expected.