For a variable-coefficient Korteweg–de Vries equation in a lake/sea, two-layer liquid, atmospheric flow, cylindrical plasma or interactionless plasma, in this paper, we derive the bilinear Bäcklund transformation, non-isospectral Ablowitz–Kaup–Newell–Segur system and infinite conservation laws for the wave amplitude under certain constraints among the external force, dissipation, nonlinearity, dispersion and perturbation.