Short answer: if your backup is a mirror, the mirror will faithfully replace every good file with the encrypted version the next time the mirror runs, and the mirror will do that without being asked.
Versions are the whole defense. Not a better disk, not a faster copy: keeping yesterday as well as today.
A mirror keeps the destination identical to the source. That is its stated job and the mirror does the job well. The line most people run is some form of:
rsync -aE --delete ~/Documents/ /Volumes/Backup/Documents/
Read --delete again with a bad morning in mind. The flag means: make the backup match, and
remove anything from the backup that is no longer at the source.
Now suppose something has encrypted your Documents folder overnight. Every file is still there, same names, same folder structure, different contents. The mirror runs at its usual hour, sees files whose contents have changed, and copies the new contents over the old ones. The mirror has done exactly what you told the mirror to do. Your backup is now a second copy of the damage.
Drop --delete and the mirror is not much better: the deletions stop propagating, but changed
files are still overwritten, because a mirror holds exactly one version of each file.
This is not a Terminal problem. The problem is a property of anything that keeps one copy.
The common thread is that none of them is doing anything wrong. They are all correctly propagating a change nobody wanted.
A versioned backup stores what a file was on Monday as well as what the file is on Friday. When Friday's copy turns out to be worthless, Monday's is still there.
Two things make that useful:
The 3-2-1 rule was written for hardware failure and the rule happens to answer this too: three copies, two kinds of storage, one somewhere else. What matters here is the last part, and specifically a copy that is not permanently attached.
A drive plugged in all week is reachable by anything running on the Mac all week. A drive plugged in on Sundays is reachable for a few hours a week. That is not sophisticated and the method is most of the practical benefit, which is why the boring advice about rotating two drives keeps being right.
Worth being plain, because this is where the category oversells itself.
A backup does not stop anything happening. A backup does not detect the attack as the attack starts, does not block a process from writing to your files, and is not a substitute for keeping macOS updated and not running things you do not trust. Anything sold to you as protection in this area is doing a different job from the one described on this page.
What a backup does is make the damage undoable. That is a smaller claim and a more useful one.
Copy Shelter keeps versions, so a file changing does not overwrite what the file was, and deleting a file on your Mac does not remove the file from the backup. Copy Shelter reads the backup back and checks every piece against the hash the piece was stored under, so a copy that has quietly become unreadable is reported. Copy Shelter writes to more than one destination if you want, and counts only the copies Copy Shelter has actually verified.
Copy Shelter does not prevent anything, and does not detect anything as the attack happens. Copy Shelter gives you history, and history is the part that gets you back to Monday.
Better than a mirror, because Time Machine keeps history: hourly for a day, daily for a month, weekly while there is room. Two caveats. Time Machine thins old snapshots as the disk fills, so depth is whatever the disk allows. And a drive attached permanently is reachable permanently.
Only if what you put there is a versioned backup. A synced copy of your live files will not do the job. A sync folder propagates the change. A backup repository written into that same folder does not, because the old versions are separate objects that nothing at the source can reach.
Longer than you would expect to notice. Thirty days covers a mistake you see immediately. A year covers the folder you have not opened since last spring, which is the one that catches people.
No, and nothing that calls itself a backup should tell you otherwise. Copy Shelter keeps versions and verifies them, so the damage is undoable. Preventing an attack is the job of keeping macOS updated, not installing things you do not trust, and not being the person who runs the attachment.
A second drive you plug in once a week, keep somewhere else, and never leave attached is not overkill and costs about the price of a takeaway. The weekly drive is the single most effective thing on this page.
Related: the 3-2-1 rule, backing up with rsync, and checking a backup is readable.