Here are a few ways you can use iCloud to back up the files on your Mac without moving them off your Mac's hard drive:
- Enable iCloud Drive on your Mac. This will sync files stored in iCloud Drive (like Documents, Desktop, etc) between your Mac and iCloud. The files stay on your Mac but are also stored in iCloud as a backup.
- Use iCloud Photo Library to store your photos and videos in iCloud. Like iCloud Drive, the full resolution versions stay on your Mac but are also stored in iCloud.
- Use iCloud Back Up. This backs up settings, apps, and some files, but not your entire hard drive. It's more for disaster recovery than a full backup.
- Use Time Machine to back up to an external hard drive, and also enable Back Up Automatically to iCloud. This will back up your full Mac disk to the external drive, while also doing a more basic iCloud backup.
So in summary, iCloud Drive and iCloud Photo Library can act as a continuous backup of your important files, while also keeping the full versions locally on your Mac. For a full system backup, Time Machine + iCloud Back Up is a good option. Just be aware iCloud has storage limits, so you may need to pay for additional storage for large backups.