See http://manual.calibre-ebook.com/customize.html#environment-variables in particular CALIBRE_OVERRIDE_DATABASE_PATH
See http:// manual. calibre- ebook.com/ customize. html#environmen t-variables in particular CALIBRE_ OVERRIDE_ DATABASE_ PATH