I have an Ubuntu server set up as a NAS server among other things. I use that space for my backups, but for safety, I back up certain crucial files to an external USB Hard-drive. I back up about once a week, but manually backing up to cold storage is a pain because my server is kind of tucked away. The problem I have is that I want to keep that hard drive plugged in, but I'm afraid that if my computer is targeted in a cyber attack (It's happened before) then it will also target my external drive. Would it be safe if I wrote a script that mounted my external drive once a week and backed up my files, and when finished it ejects itself, or do common attacks mount all drives before replacing them with AES or other encrypted versions? Would this work, and if not, what could I do to have an updated version of my crucial files in cold storage?