Depends what you're trying to say. The most normal way to refer to be fixed period of time in the past is with the simple preterite, i.e. "How long were you in Germany?" Using perfect tenses in English emphasises the present result of a past action. "How long have you been Germany?" implies that you're there now. "How long had you been in Germany?" implies that you're referring to an event which took place in the past. For instance, "How long had you been in Germany when you met her?" (This can only mean that you met her during your stay in Germany. Cf. "How long were you in Germany before you met her?"; the meeting could've taken place in Germany or elsewhere.)
no subject
Ich war nur ein Jahr dort.