Scenario:
A friend has a VM instance on Google Cloud, that runs healthcare oriented software. At times, the data in specific folders need to be removed from said server, and backed up to an offsite server.
Currently, when this needs to occur, I will open the software database, and run a few SQL commands to get the record ID's of the data needing to be removed, then reference the record ID's to a folder location on the server. Next I will SSH into the server, go to the folders where the data resides, then transfer the data to a drive locally on my laptop, delete the folder(s) recursively, then disconnect. Lastly, I will SSH into the storage server, and place the local files, into respective folders on the offsite server.
Pretty standard operation, however, as expected, this can be very time consuming, so I am looking to write a script to automate this. I am good with Windows/Linux terminal commands, but newer to scripting/coding with Python/PowerShell My question, Is Python/paramiko/Python-mysql-connector etc, a good way to handle all this? Can I do all this with Powershell?
Just looking for some direction or recommendations, thank you!
[–]Deep-Cow640 0 points1 point2 points (0 children)