The Canon

The books that comprise the Bible are referred to as the canon. But how do we know that the early Church got the canon correct?