I had to clone a working non faulty hard drive from within OSX and onto an external hard drive connected through usb port. This was to upgrade the machine from a normal hard drive to a super fast solid state hard drive. Please note this was for an Apple Macbook Pro A1278 but works with most other Macs, laptops and desktops alike.
On your Macbook Pro open up Safari or another web browser, do a search for software called SuperDuper! and download and install it. It is free to use although you can optionally send them a donation. I strongly recommend to send them even a small amount (if you can) because this software does an amazingly efficient job.
Connect the new hard drive through the usb port and follow the steps showing on SuperDuper! to clone it. You will of course need a hard drive caddy to do this. Just plug the caddy connectors into your Sata ports on the new hard drive.
You may need to initialise the new hard drive first. This is done through “Disk Utility” again from within to Macbook OS. Do a search in the search bar if you can’t find it.
Depending on how much data you have to clone across this could take a good few hours or even overnight so please be patient. Once it has finished you will be able to install your new hard drive into your Macbook and boot of it as normal.