Former President Dmitry Medvedev has threatened that if the G7 moved to ban exports to Russia, Moscow would respond by terminating the Black Sea Grain deal.