Would it be as follows instead?
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);
Thanks for the reply, Kat.
The WP version I had was 4.5.3.
Once I upgraded the core to 4.7.2, the manual backup started working fine, so it must have been an issue related to the older WP core version.