We parametrize the (2+1)-dimensional AdS space and the BTZ black hole with Fefferman-Graham coordinates starting from the AdS boundary. We consider various boundary metrics: Rindler, static de Sitter and FRW. In each case, we compute the holographic stress-energy tensor of the dual CFT and confirm that it has the correct form, including the effects of the conformal anomaly. We find that the Fefferman-Graham parametrization also spans a second copy of the AdS space, including a second boundary. For the boundary metrics we consider, the Fefferman-Graham coordinates do not cover the whole AdS space. We propose that the length of the line delimiting the excluded region at a given time can be identified with the entropy of the dual CFT on a background determined by the boundary metric. For Rindler and de Sitter backgrounds our proposal reproduces the expected entropy. For a FRW background it produces a generalization of the Cardy formula that takes into account the vacuum energy related to the expansion.