Preheat a skillet over medium heat.
Spread 1 tablespoon of pesto on one side of each slice of sourdough bread.
Layer the fresh mozzarella slices on top of the pesto on one slice of bread. Season with salt and pepper.
Place the other slice of bread on top, pesto side down, to form a sandwich.
Melt 1 tablespoon of butter in the preheated skillet. Once melted, add the sandwich to the skillet.
Cook for about 3-4 minutes, or until the bottom is golden brown.
Carefully flip the sandwich and add the remaining tablespoon of butter to the skillet. Cook for another 3-4 minutes, until the other side is golden and the cheese is melted.
Remove from the skillet, let cool for a minute, then slice in half and serve warm.