by Bret Miller.
Assuming you're trying to make a copy of your site, you need both a copy of the moodledata folder and a copy of the database. Then config.php needs to be set to point at the copies of both the database and moodledata so that it will see the older version of Moodle and prompt to upgrade instead of making a new install.