Prepare the tomatoes. Cut the tomatoes into quarters. Cover a baking sheet with parchment, place the tomatoes tightly next to each other, cut side up. Sprinkle the tomatoes with a mixture of salt, sugar, pepper, chopped basil, and rosemary. Add some basil and rosemary, put 5 cloves of garlic on top, and pour olive oil. Keep the tomatoes in a preheated oven for about 4-5 hours, using the convection mode.
Make the preserves: pour olive oil into the jar, add a clove of garlic and the remaining basil and rosemary. Put a layer of tomatoes, then more herbs and a clove of garlic. Lay out in this order until the jar is filled to the top. Roll up the jar with a lid and put it in the refrigerator.