I couldn't find this information anywhere else so I thought it might be a good resource for others. It's a complete instruction of how to make a backup of your whole moodle-setup and then recover it.
This method is tested on a moodleistallation running mysql.
Backup process:
1. In phpMyAdmin select the database you wish to backup and then go to Export menu.
2. Select "Structure and Data" and check all the rest of the checkboxes (optional: gzipped and zipped, I recommend leaving these unchecked)
3. Press "Go" and choose a destination for the backup-file.
4. Make a copy of the directory where all uploaded documents/files are saved.
5. Make a copy the dirroot directory. (The directory with all the web files, PHP files...)
Recovery:
1. Create a new empty database.
2. Install a new installation of moodle using the new database.
3. In phpMyAdmin, choose the new database, go to menu: SQL
4. In the field "location of the textfile" choose the destination to the backupfile (the one you exported)
5. Press go
6. Make sure that the settings in config.php is correct.
Voilà!
Please comment if there's something I've forgot.