implemented file backup of databases

This commit is contained in:
Kevin Veen-Birkenbach 2022-08-31 20:48:40 +02:00
parent ff4e192a7b
commit 16e1a76eef

View File

@ -86,7 +86,6 @@ for volume_name in volume_names:
database_entry = databases_entries.iloc[0] database_entry = databases_entries.iloc[0]
database_backup_command = "docker exec " + container + " /usr/bin/mysqldump -u " + database_entry["username"] + " -p" + database_entry["password"] + " " + database_entry["database"] + " > " + mysqldump_destination_file database_backup_command = "docker exec " + container + " /usr/bin/mysqldump -u " + database_entry["username"] + " -p" + database_entry["password"] + " " + database_entry["database"] + " > " + mysqldump_destination_file
print_bash(database_backup_command) print_bash(database_backup_command)
else:
print("Backup files...") print("Backup files...")
files_rsync_destination_path = volume_destination_dir + "/files" files_rsync_destination_path = volume_destination_dir + "/files"
pathlib.Path(files_rsync_destination_path).mkdir(parents=True, exist_ok=True) pathlib.Path(files_rsync_destination_path).mkdir(parents=True, exist_ok=True)