Backup Proxmox Virtual Machine to Remote Server using Python script
import subprocess import sys def initiateBackup(vmID): # Lets build command to execute command = [] command.append("vzdump") command.append(vmID) # Executing the command result = subprocess.call(command) if(result==0): return "OK" else: print("Backup was not successfull.") sys.exit() def getPath(vmID): import os for file in os.listdir("/var/lib/vz/dump"): if file.endswith(".vma") and (file.find("vzdump-qemu-"+vmID)>-1): return "/var/lib/vz/dump/"+file def sendFileViaSCP(ipAddress,srcFile,destination): print("#####################################################") print(" Se...