mirror of
https://github.com/kevinveenbirkenbach/docker-volume-backup.git
synced 2024-11-22 00:11:03 +01:00
Solved reference bug
This commit is contained in:
parent
fe0ed83dd4
commit
7927192073
@ -66,14 +66,14 @@ for volume_name in volume_names:
|
|||||||
versions.sort(reverse=True)
|
versions.sort(reverse=True)
|
||||||
if len(versions) > 1:
|
if len(versions) > 1:
|
||||||
last_version = versions[1]
|
last_version = versions[1]
|
||||||
last_version_dir_path = versions_dir_path + last_version + "/" + volume_name
|
last_version_files_dir = versions_dir_path + last_version + "/" + volume_name + "/files"
|
||||||
if os.path.isdir(last_version_dir_path):
|
if os.path.isdir(last_version_files_dir):
|
||||||
link_dest_parameter="--link-dest='" + last_version_dir_path + "' "
|
link_dest_parameter="--link-dest='" + last_version_files_dir + "' "
|
||||||
else:
|
else:
|
||||||
print("No previous version exists in path "+ last_version_dir_path + ".")
|
print("No previous version exists in path "+ last_version_files_dir + ".")
|
||||||
link_dest_parameter=""
|
link_dest_parameter=""
|
||||||
else:
|
else:
|
||||||
print("No previous version exists in path "+ last_version_dir_path + ".")
|
print("No previous version exists in path "+ last_version_files_dir + ".")
|
||||||
link_dest_parameter=""
|
link_dest_parameter=""
|
||||||
source_dir = "/var/lib/docker/volumes/" + volume_name + "/_data/"
|
source_dir = "/var/lib/docker/volumes/" + volume_name + "/_data/"
|
||||||
rsync_command = "rsync -abP --delete --delete-excluded " + link_dest_parameter + source_dir + " " + files_rsync_destination_path
|
rsync_command = "rsync -abP --delete --delete-excluded " + link_dest_parameter + source_dir + " " + files_rsync_destination_path
|
||||||
|
Loading…
Reference in New Issue
Block a user