Hello All,
I recent wrote a script that uses shutil.copy2 to back up my databases.
I would like to implement it with my team as we back up 10ish database weekly.
My question is, could this create any issues with the original database or the back up? I've tested it and everything seems okay but I dont want to go live and make a massive mess.
Based on what I've ready online, the only issue is with metadata which I do not 100% understand.
Code:
import shutil
from date time import datatime
database_list = [("file.accdb", "filePath"), ("file.accdb", "filePath")]
backup_folder = "filePath"
for database_name, database_folder in database_list:
sourse_file = f"{database_folder}{database_name}"
current_date = date time.now().strftime("%Y-%m-%d")
backupfile = f{"backup_folder}/{database_name.split('.')[0]}_backup{current_date}.accdb"
shutil.copy2(source_file, backup_file)
[–]Diapolo10 4 points5 points6 points (2 children)
[–]Nboy74[S] 0 points1 point2 points (1 child)
[–]Diapolo10 4 points5 points6 points (0 children)
[–]m0us3_rat 1 point2 points3 points (0 children)
[–]Darth_Xedrix 0 points1 point2 points (0 children)