mirror of
https://github.com/kevinveenbirkenbach/docker-volume-backup.git
synced 2025-09-16 06:56:01 +02:00
Use dirval CLI instead of direct Python script reference in backup-docker-to-local.py and declare dirval in requirements.yml
Details: - Replaced python call to directory-validator.py with direct 'dirval' command - Updated error message accordingly - Added dirval as dependency in requirements.yml Conversation: https://chatgpt.com/share/68c31763-6a84-800f-a697-50fa40e9841b
This commit is contained in:
@@ -77,15 +77,12 @@ def get_instance(container):
|
|||||||
|
|
||||||
def stamp_directory():
|
def stamp_directory():
|
||||||
"""Stamp a directory using directory-validator."""
|
"""Stamp a directory using directory-validator."""
|
||||||
stamp_command = (
|
stamp_command = f"dirval {VERSION_DIR} --stamp"
|
||||||
f"python {SCRIPTS_DIRECTORY}/directory-validator/"
|
|
||||||
f"directory-validator.py --stamp {VERSION_DIR}"
|
|
||||||
)
|
|
||||||
try:
|
try:
|
||||||
execute_shell_command(stamp_command)
|
execute_shell_command(stamp_command)
|
||||||
print(f"Successfully stamped directory: {VERSION_DIR}")
|
print(f"Successfully stamped directory: {VERSION_DIR}")
|
||||||
except BackupException as e:
|
except BackupException as e:
|
||||||
print(f"Error stamping directory {VERSION_DIR}: {e}")
|
print(f"Error running 'dirval' for {VERSION_DIR}: {e}")
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
||||||
def backup_database(container, volume_dir, db_type):
|
def backup_database(container, volume_dir, db_type):
|
||||||
|
@@ -1,3 +1,5 @@
|
|||||||
pacman:
|
pacman:
|
||||||
- lsof
|
- lsof
|
||||||
- python-pandas
|
- python-pandas
|
||||||
|
pkgmgr:
|
||||||
|
- dirval
|
Reference in New Issue
Block a user