XF 1.4 Easiest way to create working copy of current install

Might be a basic question, but what is the easiest way of creating a complete copy of your forum (and database) to test an upgrade on before you do it for real? Copying files is fairly straight forward, but what about making sure it links with the copied MySQL database?