Create Restic Backup Program

I’m sharing a wrapper program written in python to backup my files in my device using restic. import subprocess restic_command = ['restic', 'backup'] backup = ["C:\\Users\\veronica\\ibisPaint", "C:\\Users\\veronica\\Pictures", "C:\\Users\\veronica\\Documents"] print("List of directories to be backed up:\n" ) #list the files that will be backed up. #enumerate = allows you to keep track of the number of iterations in a loop. for number, dir in enumerate(backup, start=1): print(f" {number}. {dir}") # Or: print(" " + str(number) + ".", letter ) # \n makes a new line print("\nBackup process started...\n") # combines the lists together. backup_command = restic_command + backup restic = subprocess.run(backup_command, shell=True) The end. -w- ...

December 30, 2024 · 1 min · SourFox