The chemical reactions and pathways resulting in the formation of stachyose, the tetrasaccharide beta-D-fructofuranosyl alpha-D-galactopyranosyl-(1->6)-alpha-D-galactopyranosyl-(1->6)-alpha-D-glucopyranoside.
stachyose anabolism