Backups connected to your computer can be encrypted by ransomware along with everything else. Keep at least one backup offline or protected from alteration, and regularly test its integrity and restoration. Disconnection alone does not prove that a copy is clean or usable.
“A backup malware can reach is a backup malware can ruin.”
Sources for this correction, checked October 17, 2026: https://www.cisa.gov/stopransomware/ransomware-guide ; https://www.ic3.gov/CSA/2023/230523.pdf