mirror of
https://github.com/kevinveenbirkenbach/docker-volume-backup.git
synced 2026-01-23 14:42:56 +00:00
Compare commits
3 Commits
v1.0.0
...
88b35ee923
| Author | SHA1 | Date | |
|---|---|---|---|
| 88b35ee923 | |||
| 71f79929be | |||
| 0fb8efba4f |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,2 +1,3 @@
|
||||
__pycache__
|
||||
artifacts/
|
||||
*.egg-info
|
||||
2
MIRRORS
2
MIRRORS
@@ -1,4 +1,4 @@
|
||||
git@github.com:kevinveenbirkenbach/backup-docker-to-local.git
|
||||
ssh://git@git.veen.world:2201/kevinveenbirkenbach/backup-docker-to-local.git
|
||||
ssh://git@code.infinito.nexus:2201/kevinveenbirkenbach/backup-docker-to-local.git
|
||||
https://pypi.org/project/baudolo/
|
||||
https://pypi.org/project/backup-docker-to-local/
|
||||
|
||||
BIN
dist/backup_docker_to_local-1.0.0-py3-none-any.whl
vendored
Normal file
BIN
dist/backup_docker_to_local-1.0.0-py3-none-any.whl
vendored
Normal file
Binary file not shown.
BIN
dist/backup_docker_to_local-1.0.0.tar.gz
vendored
Normal file
BIN
dist/backup_docker_to_local-1.0.0.tar.gz
vendored
Normal file
Binary file not shown.
@@ -4,22 +4,6 @@ import argparse
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def _default_repo_name() -> str:
|
||||
"""
|
||||
Derive the repository name from the folder that contains `src/`.
|
||||
|
||||
Expected layout:
|
||||
<repo-root>/src/baudolo/backup/cli.py
|
||||
|
||||
=> parents[0]=backup, [1]=baudolo, [2]=src, [3]=repo-root
|
||||
"""
|
||||
try:
|
||||
return Path(__file__).resolve().parents[3].name
|
||||
except Exception:
|
||||
return "backup-docker-to-local"
|
||||
|
||||
|
||||
def parse_args() -> argparse.Namespace:
|
||||
dirname = os.path.dirname(__file__)
|
||||
default_databases_csv = os.path.join(dirname, "databases.csv")
|
||||
@@ -41,7 +25,7 @@ def parse_args() -> argparse.Namespace:
|
||||
|
||||
p.add_argument(
|
||||
"--repo-name",
|
||||
default=_default_repo_name(),
|
||||
default='backup-docker-to-local',
|
||||
help="Backup repo folder name under <backups-dir>/<machine-id>/ (default: git repo folder name)",
|
||||
)
|
||||
p.add_argument(
|
||||
@@ -51,8 +35,8 @@ def parse_args() -> argparse.Namespace:
|
||||
)
|
||||
p.add_argument(
|
||||
"--backups-dir",
|
||||
default="/Backups",
|
||||
help="Backup root directory (default: /Backups)",
|
||||
default="/var/lib/backup/",
|
||||
help="Backup root directory (default: /var/lib/backup/)",
|
||||
)
|
||||
|
||||
p.add_argument(
|
||||
|
||||
Reference in New Issue
Block a user