If you are cloning your database you need to do this
1. copy your files to a new directory.
2. copy your database tables to a new database.
3. edit your config file and point to the new database and server paths etc.
4. run the install script on your new test install to correct all paths urls etc or manually edit your settings table on this new database with the new info.
I would suspect if editing your test install messes with your main install you have not edited your config file with the proper database info.