The inclusive production of omega and phi mesons is studied in the backward region of the interaction of 12 GeV protons with polyethylene, carbon, and copper targets. The mesons are measured in e^+ e^- decay channels. The production cross sections of the mesons are presented as functions of rapidity y and transverse momentum p_T. The nuclear mass number dependences (A dependences) are found to be A^{0.710 +/- 0.021(stat) +/- 0.037(syst)} for omega mesons and A^{0.937 +/- 0.049(stat) +/- 0.018(syst)} for phi mesons in the region of 0.9 < y < 1.7 and p_T < 0.75 GeV/c.