#!/usr/bin/env python3
import subprocess
from multiprocessing import Pool
import os
def backup(src):
dest = os.getcwd() + "/data/prod_backup/"
print("Backing up {} into {}".format(src, dest))
subprocess.call(["rsync", "-arq", src, dest])
if __name__ == "__main__":
src = os.getcwd() + "/data/prod/"
list_of_files = os.listdir(src)
all_files = []
for value in list_of_files:
full_path = os.path.join(src, value)
all_files.append(full_path)
with Pool(len(all_files)) as pool:
pool.map(backup, all_files)
Business Email :
[email protected]
My Channel Link:
https://www.youtube.com/c/KJGamerzStudio
My Instagram Link:
https://www.instagram.com/you_can_call_me_kj/
About : KJ GamTech Studio is a YouTube Channel, where you will find Tech, Tutorials and gaming videos in Hindi, I hope this video was Useful and you liked it, if you did press the thumbs up button.
If You Like My Video Than Please Subscribe My Channel.
Тэги:
#google_it_automation_with_python_professional_certificate #google_professional_certificate #google_it_automation_with_python #troubleshooting_and_debugging_techniques_coursera_solutions #troubleshooting_and_debugging_techniques_week_2_full_solved #Troubleshooting_&_Debugging_Techniques #coursera:_troubleshooting_and_debugging_techniques_|_complete_external_graded_assignment_|_by_google #google_it_automation_with_python_specialization #python_tutorial #kj_gamtech_studio #week_2