The best method of defence against ransomware is data backup. When ransomware attacks, you have a safe and simple option to restore your data without paying the ransom if you have a recent backup of it and can stop the ransomware from encrypting it as well.