Chances are you’re pretty familiar with the saying, “Prevention is the best medicine.” Sure, that’s true for your own personal health, but now more than ever, it’s also true for the health of your technological devices.

The use of ransomware by cybercriminals has become a growing trend over the last few years, and it has cost individuals and corporations alike the loss of intellectual property, crucial data and money – all at alarming rates.

In the last week alone, a ransomware attack called WannaCry spread like wildfire over at least 150 countries, attacking approximately 300,000 machines worldwide. The malware software used a flaw in the code for the Windows operating system and encrypted vast amounts of essential data, ultimately holding that information hostage unless the user paid a ransom. Included in the victims were the British health system, Germany’s train stations and more than 29,000 institutions across China.

“Great software has seemingly limitless potential to solve human problems — and it can spread around the world in the blink of an eye. Malicious code moves just as quickly, and when software is created for the wrong reason, it has a huge and growing capacity to harm millions of people,” Craig Federighi, Apple’s senior vice present of software engineering, warned in a Washington Post Op-Ed more than a year ago.

Turns out, he was absolutely right.

So what can individuals and businesses – both small and large – do to protect their valuable data? The most effective approach is prevention, and the good news is that there are plenty of solutions out there to help you achieve just that.

Here, we have identified three tips for protecting yourself from ransomware.

1. Update your software

Sometimes all it takes is a simple system update to keep your computer and your data safe from attack. Software engineers at Microsoft and Apple are constantly monitoring the security of their operating systems, and any time a flaw is identified, an update containing the necessary patch is offered to their users. In the recent WannaCry incident, it has been noted that a Windows software update was available prior to the attack that could have prevented the victims’ PCs from becoming infected. But as Chris Wysopal, the chief technology officer of Veracode explained to the New York Times, “People kind of got complacent and not vigilant about updating their machines,” and as a result put themselves and their data at risk.

2. Install anti-virus software

Anti-virus apps from reputable vendors – like Kaspersky Lab, Bitdefender and Malwarebytes – can be an invaluable asset when it comes to keeping your PC secure and out of reach from hackers. These programs do an excellent job of detecting ransomware and neutralizing it. However, it’s important to remember that, just like your system updates, it’s imperative that you keep your anti-virus software up-to-date so that it has the capability to identify and thwart the latest malware.

3. Back up your data

Even with all the proper precautions in place, there still exists a small risk that a particularly vicious ransomware may make its way into your data, which could wreak havoc not only on your own computer but in your entire network as well. In that case, the best way to protect yourself from losing any information is to ensure that your network and all of your files are backed up regularly.

Hewlett Packard Enterprise’s Connected MX software is one of the best at protecting, managing and controlling endpoint information. It provides protection for secure information access, sharing and backup without compromising mobile workforce productivity. In other words, this software stores all of the data across your entire network in a secure environment so that, should information be lost, it can be recovered efficiently and safely – all without jeopardizing your workflow.

If, despite your best efforts, you still end up the victim of ransomware, your first step should be to disconnect your computer from the internet. Next, call the police and report the attack. Both of these measures will help to keep the virus from spreading.

Ultimately, the lesson here is: Don’t get complacent! It’s only a matter of time until the next disastrous ransomware rears its ugly head, and the best thing you can do is to be prepared.