Worse, Apple provides little internal support of data recovery for mac. The alternative here is to become familiar with 3rd-party data recovery software.
Signs of pending data loss on a large scale or most closely linked with a hard disk that is near failure. While not a given, when you notice your computer runs slowly even though you have been on top of good maintenance practices, you might be near data loss.
Now let us distinguish the above from an occasional data loss event due to sudden power interruption or a file transfer that hangs or even the rare case of a virus on the Mac. There are many ways by which data files can be lost and anomalous events should be recorded so that you are aware of your Mac's behavior should it start acting up more than normal.
When you become aware that data from your Mac is lost, have your hard disk checked for consistency and any physical wear. The Mac data (and hard disk) recovery software you select should do this for you once you load the program. The program will give you a report of the health of your hard drive. Any defects on your Mac's hard disk will be noted and bad areas of the disk will be marked so that no data can be written to them. This is also a sign that your hard disk is wearing and having a back up resource for your data files of importance to you is a great idea.
Once you know the state of your Mac hard drive, you can then take the opportunity to scan for and recover lost data files using your selected program of choice.
There are many manufacturers of Mac data (and hard disk) recovery software. Finding one that works for you takes some diligent research. Popular programs will become evident and some users post their experience in using one tool over another that you can leverage for your situation, equipment, and environment.
It is wise that you investigate data recovery software for your Mac before you need it to become familiar with its use so that when the time comes, you will breeze through the attempts at date file recovery. It is also a smart move to note any unusual message displayed to you by the Mac operating system or unusual disk activity and definitely respond to such by checking out data and hard drive recovery tools online or at your local Mac technician.
In case your hard disk cannot be accessed, data recovery software for the Mac is often bundled with both hard disk troubleshooting and recovery and file recovery software. If your hard disk is inoperable, running such software from your original installation CD or DVD is the way to go.