South Africa beat India by 30 runs in the opening test at Eden Gardens to go 1-0 up in the two-match series on Sunday.