Immutability!
For some reason nobody here mentioned this! There's only one thing which can protect you against ransomware - backup storage with immutability! It can be S3, custom script setting immutable flag, read-only snapshots and so on...
But... You need to make sure, that your backup storage is properly tightened, so even you, as the owner, cannot change immutable data without physical access to the server.
Immutability! For some reason nobody here mentioned this! There's only one thing which can protect you against ransomware - backup storage with immutability! It can be S3, custom script setting immutable flag, read-only snapshots and so on...
But... You need to make sure, that your backup storage is properly tightened, so even you, as the owner, cannot change immutable data without physical access to the server.