Backup Specify 6 using Windows Scheduler (Part 1)

January 27th, 2012

Sometimes it is nice to know your Scientific Collection is safe. And yes Specify asks you to back up your system but wouldn’t be great if you can have the machine do it automatically, say every Friday night. Well here are a few tips to get a batch in place that does just that. This guide is for Windows only.

Step 1 is to make a folder (example: c:\_specify_backup\) on your same computer. This has to be on the same computer that is running the mysql specify server. We are assuming this machine is running Windows.

Step 2 you will need to make a “specify_backup.bat” in that folder and edit it using notepad. I will use { } to fill in your own information here. C:\_specify_backup can be changed to any folder name you made in step 1. Now paste and modify the code as needed to match your connection information. Note that this is not your Specify connection but your mysql db connection information.

mysqldump {specify_database_you_want_to_backup} -u {db_user_with_permission} -p{user_pass} > C:\_specify_backup\specify6_{collectioncode}_%date:~-4%%date:~-7,2%%date:~-7,2%.sql
c:\_specify_backup\gzip.exe C:\_specify_backup\specify6_{collectioncode}_%date:~-4%%date:~-7,2%%date:~-7,2%.sql

Step 3 is to go to the GZip website (http://www.gzip.org/#exe) and download http://www.gzip.org/gzip124xN.zip and move the gzip.exe into the same specify backup folder. So now you should have the specify_backup.bat and gzip.exe files in your folder.

Step 4, lets test that it is working by going to Dos and running the .bat. To do this you can go to Start > Run and type “cmd” and a black dos window should open. You will need to type:

cd C:\_specify_backup\
specify_backup.bat

If all the connection information was correct you should see a specify_{collectioncode}_year_month_day.gz file. This is a compressed zip file containing your database.

Step 5 go ahead and delete this file using “My Computer” or any other way you normally would know how to delete a file. In dos it is “rm {filename}”.

Step 6 go to Start and search for “Scheduler” and you should see Task Scheduler. Click that and go to the next step.

Step 7 you need to click the “Task Schedule Library” then click “Create Task…”

Now fill in the information:
General > Name: Specify 6 Backup
General > Description: Creates weekly backup for Specify 6 databases.
Check “Run whether user is logged in or not”
Check “Run with highest privileges”
Triggers > New… >
Check: Weekly, Friday and change the time to 22:00 (to run at 10pm every Friday)

Actions > New… > Program Script: C:\_specify_backup\specify_backup.bat
Click ok and you should see a new task in your “Task Schedule”.

If you did everything correctly you should see a backup of you database right after 10pm every Friday. Since each file keeps the date in the name you will be able to keep all the weekly backups. If you see that your file is 0 in filesize then something probably did not work correctly with the connection.

In “Part 2” to of this blog we will address how to add another Scheduled Task to send these backups to an online FTP location for offsite storage. QuickTip: If you use Dropbox (https://www.dropbox.com/) you can change the mysqldump path to point to a dropbox folder and it will automatically get synchronized and backed up using the Dropbox service. Note: If you make that folder public then anyone will be able to download your Specify backups which may or may not be a good thing. Also note that you are storing a user/password to connect to mysql on your machine which may produce some risks. It might be advised to consult with your IT department to have a special user that restricts this connection only to your collection db only.

Any questions or comments feel free to send me an email at mikegiddens (at) silverbiology.com

Static Maps for CartoDB

January 23rd, 2012

CartoDB (http://www.cartodb.com) has and will be a big game changer for 2012.  One thing it is great at  making are tiled, interactive maps for the web.  One of the important things with the projects we work on here at SilverBiology is being able to produce a single image of those tiles to be used with non interactive and offline projects.  And so we decided to write our own PHP static map program.


Git Hub Project: https://github.com/silverbiology/cartodb-staticmap-php

World map tiles are broken down into individual 256 pixel images called tiles.  The closer you get to the surface of the earth the more tiles (higher level of detail) exists.  Most online mapping engines, including CartoDB work in this manner.  What we have done is to take those generated tiles and reassemble them so that the end result is one single image of only what you want to see.

Our CartoDB static map program focuses on two techniques.  The first is what we call viewport mode.  In this mode we take two lat/lng points to form a geospatial box.  In this mode you can make use of any of the CartoDB features as you would when using their interface.  Two examples are shown below.  The first is only the tile cells joined together where the two points are found.  In this case you will find extra white space but should overlap with matching Google tiles.  The second example is having the image trimmed to the exact lat/lng pixels on those tile images.

One with trimming.

The second method that is most common is to select a single lat/lng point and center an image based on a zoom resolution and a width and height.  An example looks something like this.

The idea behind creating this project was to allow us to easily combine and generate a static image in real time or to write a script that would make use of this class to cache a set of images. CartoDB Static Maps works both as a image URL, as a included PHP class in your project, or directly from the command line interface on your server.  Some practical uses cases would be to:

  • Generate Static Distribution Maps
  • “Save as” feature from an interactive map
  • Generate images for downloading images of maps
  • Offline support

We hope others can make use of our work with this static map project and encourage you to help participate in making it better.  If you would like to contribute on this project please contact mikegiddens (at) silverbiology.com

Amazon EC2 + Tesseract + OCR = Thank You!

March 10th, 2011

This day I took on the challenge of setting up a Amazon Micro (Free Tier) machine to run a simple web service for OCR using Tesseract (http://code.google.com/p/tesseract-ocr/).

There is a default web service setup with params:

img: uri to the jpg image that you want to transform
callback:
used for crossdomain services
format: deafults to json but you can also supply txt to get just raw text

To build a machine you can follow these steps or if you are interested in the image let us know and I will contact you with more information.

Read the rest of this entry »

SilverBiology Open Source Views & Policies

November 30th, 2010

We have been asked a few time recently about why we make license base software and what our views are on open source software.  So we decided to make a little video answering some of these questions.  The short answer is we do make open source software but not always under our name since it is normally funded by other organizations.  We make license based software to support a sustainable business model to development and support current and future projects. So each license is a portion of the funding needed to develop each application.  So the more user base we have the more the software will be improve.

What is a Darwin Core Archive and who uses it?

November 18th, 2010

In our upcoming release of SilverCollection v1.1 we are moving to support the loading and sharing of Darwin Core Archives.  For those that are not familiar with this we have put together a short video explaining about what they are, who uses them, and how to build them.  Any questions please contact us. Enjoy!

SilverImage Overview

November 12th, 2010

With the Advancing Digitization of Biological Collections (ADBC) around the corner we thought it would be good to explain how to image a herbarium collection using a copy station and silver image.  If you are interested in learning more visit our product page or contact us directly.

Image Tour 2010 Newsletter #1

March 27th, 2010

This is our first newsletter for our planned image tour and we would like to thank everyone that has submitted a request for us to visit.

In this Issue:

  • How to stay informed
  • Who we will be visiting and when
  • SERNEC meeting during ASB
  • Final Result

How to stay informed:

We will be communicating through newsletters like this one and our special webpage at: http://www.silverbiology.com/botany2010/imagingtour.html.  Our goal is to provide as much information about what we are doing to get ready for this imaging tour.  If you have any questions about this event that we have not addressed please let us know.

Who we will be visiting and when:

Currently we are still collecting invitations on who we will be visiting and where you would like us to go.  We will be accepting requests until May 1st.  At that time we will start to plan a route and confirm some dates that we are able to visit.  Once we get in contact with each collection we will post the planned schedule online. The map that we will be using is located here: SilverBiology Imaging Tour 2010 Map

Current we have included everyone that has made a request with the following key:

  • Green Icons = Invited
  • Yellow Icons = Pending Invitation
  • Red = Confirmed Location and Date

SERNEC meeting during ASB:

Tom Sasek will be presenting an overview about CyberFlora Louisiana (http://news.cyberfloralouisiana.com/) and how well the imaging method works.  This SilverBiology method will be the same as what we will be demonstrating during the tour.  We would also like for you to encourage other SERNEC members that are interested in digitization efforts to join in the tour or come visit while we are giving our demonstration.  We can only visit so many collections during this tour but knowing everyone that is interested might encourage us to extend or follow up with a second tour in the near future.

Final Result:

The final result will be an online SilverCollection web portal that will have all images and information available that we have processed.  This will be a small fraction of the total specimens in the United States but should act as a viable solution for larger plans for state and regional efforts.  We will also include a related webpage that will contain all the information about how we processed this data, how long it took and anything else that is related.

Have some ideas?

We hope to learn more about providing national imaging and processing solutions.  We hope to demonstrate simple, efficient, and quick solutions to mobilizing scientific collections.  We will continue to listen and do whatever we can to make our software as user friendly as possible.  If you have an idea you can send an email to: contact@silverbiology.com or reply back to this email and let me know what is on your mind.

If you know someone that would like to receive future newsletters they can go to:
http://www.silverbiology.com/newsletter/

HelpingScience Newsletter, March 2010

March 23rd, 2010

In this Issue:

  • Collections currently providing images
  • Where we are with the software
  • New this month
  • What are our plans for April
  • Summer Imaging Tour

Since our public announcement at TDWG 2009 we have had the chance to talk with a number of large and small collections interested in this method and technology for processing herbarium label images.  It is our goal to implement an international service that can help all herbaria.

Read the rest of this entry »

SilverBiology Imaging Tour 2010

March 10th, 2010

We are please to announce we will be attending BOTANY 2010 this year. Being the year of biodiversity we decided to also perform an experiment & case study by volunteering to image herbarium specimens before and after the conference along the east coast. This year the conference will be held in Providence, Rhode Island on July 31 - August 4 at the Rhode Island Convention Center. More information about the conference can be found on the official website.

Imaging Tour

SilverBiology will be performing full day imaging and demonstrations of our software.  We will be leaving from our office in Baton Rouge on July 18th and driving to Botany 2010 (BSA Conference in Providence, Rhode Island).  We will be passing through the east coast until August 15th.  During this time we would like to stop and provide a one day workshop on imaging, processing, and interacting with herbarium specimen sheets.  Our goal during this tour is to image and process over 5,000 specimen sheets then present that information online in our newest version of our SilverCollection web portal.  We are asking for interested herbaria to request that we stop and visit by sending us an email at contact@silverbiology.com.

For complete details on the project please visit: http://botany2010.silverbiology.com/

SilverBiology Timeline

December 13th, 2009

As we attend more conferences and start new projects it is important for us to know what we have done and what we plan on doing for the future.  We feel that it is important to know the history of a company and also give you a chance to see our schedule in the near future.  With that being said we put together a new web page on our website called Timeline.  This web page shows everything about our company in an interactive timeline tool.

We will continue to update the timeline with new projects and events and hope that you enjoy this new feature on our website.  Link to the SilverBiology Timeline