See:
http://manual.calibre-ebook.com/faq....ter-to-another
And:
http://manual.calibre-ebook.com/faq....backup-calibre
As BR said -- the config data *should* be compatible.
As far as the actual library structure goes, I recommend
always using Restore database (see first link) when switching OSes, just in case -- there can be subtle problems caused by e.g. filesystem/OS case sensitivity, and Restore will
guarantee the database correctly points to all the ebook files.