From c5f39511a2ed5e7b3c956d3ebf7a080006b9ca5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Radoslav=20Bod=C3=B3?= <bodik@cesnet.cz> Date: Mon, 25 Mar 2024 13:42:14 +0100 Subject: [PATCH] general: cleanups --- .gitignore | 1 + Makefile | 2 +- README.md | 7 +++++++ rwm.py | 1 - 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index e3b95ea..15a6fcf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ __pycache__/ .coverage +.pytest_cache/ .vscode/ rwm.conf testfile* diff --git a/Makefile b/Makefile index 71fd0ed..17aa5f2 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ all: lint install: - apt-get -y install awscli make python3-cryptography rclone yamllint + apt-get -y install awscli make python3-cryptography rclone restic yamllint venv: apt-get -y install python3-venv diff --git a/README.md b/README.md index 8615f2e..df6e49d 100644 --- a/README.md +++ b/README.md @@ -69,6 +69,13 @@ rwm rcc lsl rwmbe:/ ### Notes +* https://rclone.org/commands/rclone_sync/ + +It is always the contents of the directory that is synced, not the directory itself. +So when source:path is a directory, it's the contents of source:path that are copied, +not the directory name and contents. See extended explanation in the copy command if unsure. + + * corect, fails to download corrupted files ``` root@bacula-test:/opt/rwm# ./rwm.py rcc copy rwmbe:/testfile.txt . diff --git a/rwm.py b/rwm.py index 86bfa76..874b241 100755 --- a/rwm.py +++ b/rwm.py @@ -116,7 +116,6 @@ class RWM: "RESTIC_PASSWORD": self.config["RES_PASSWORD"], "RESTIC_REPOSITORY": f"s3:{self.config['S3_ENDPOINT_URL']}/{self.config['RES_BUCKET']}", } - #--one-file-system return subrun(["restic"] + args, env=env, check=False).returncode def main(argv=None, dict_config=None): -- GitLab