The chemical reactions and pathways resulting in the formation of ajugose, the hexasaccharide beta-D-fructofuranosyl alpha-D-galactopyranosyl-(1->6)-alpha-D-galactopyranosyl-(1->6)-alpha-D-galactopyranosyl-(1->6)-alpha-D-galactopyranosyl-(1->6)-alpha-D-glucopyranoside, by a pathway in which galactan:galactan galactosyltransferase catalyzes chain elongation by transferring the alpha-galactosyl residue of one raffinose-family oligosaccharide to another.