4 Achegas 339b9671d4 ... a92dd9dda1

Autor SHA1 Mensaxe Data
  jherve a92dd9dda1 Bump version hai 11 meses
  jherve 35bad26ea5 Add log file for borgmatic hai 11 meses
  jherve 5f05c7ee06 Remove useless constants hai 11 meses
  jherve 20bf25e036 Remove some useless files hai 11 meses

+ 0 - 20
pc_backup/config/borgmatic.d/home.yaml

@@ -1,20 +0,0 @@
-<<: !include /etc/borgmatic/common.yaml
-
-source_directories:
-  - /mnt/source/home/theenglishway/Documents/cv
-  - /mnt/source/home/theenglishway/Documents/formations/5_jours
-  - /mnt/source/home/theenglishway/Documents/job_search_campaign/jobs
-
-archive_name_format: 'home-{hostname}-{now}'
-source_directories_must_exist: true
-
-keep_hourly: 10
-keep_daily: 7
-keep_weekly: 4
-keep_monthly: 12
-keep_yearly: 10
-
-commands:
-  - before: configuration
-    run:
-      - uname -a | grep "deb" > /dev/null || exit 75

+ 0 - 22
pc_backup/config/borgmatic.d/smartphone.yaml

@@ -1,22 +0,0 @@
-<<: !include /etc/borgmatic/common.yaml
-
-constants:
-  redmi_storage: "{home}/mnt/redmi/Espace de stockage interne partagé"
-
-source_directories:
-  - "{redmi_storage}/DCIM/Screenshots"
-  - "{redmi_storage}/Pictures/Messenger"
-
-archive_name_format: 'smartphone-{hostname}-{now}'
-source_directories_must_exist: true
-
-keep_hourly: 10
-keep_daily: 7
-keep_weekly: 4
-keep_monthly: 12
-keep_yearly: 10
-
-commands:
-  - before: configuration
-    run:
-      - uname -a | grep "deb" > /dev/null || exit 75

+ 0 - 18
pc_backup/config/borgmatic.d/windows.yaml

@@ -1,18 +0,0 @@
-<<: !include /etc/borgmatic/common.yaml
-
-source_directories:
-  - "{home_windows}/Documents"
-
-archive_name_format: 'windows-{hostname}-{now}'
-source_directories_must_exist: true
-
-keep_hourly: 10
-keep_daily: 7
-keep_weekly: 4
-keep_monthly: 12
-keep_yearly: 10
-
-commands:
-  - before: configuration
-    run:
-      - uname -a | grep "microsoft" > /dev/null || exit 75

+ 1 - 4
pc_backup/config/borgmatic/common.yaml

@@ -1,13 +1,10 @@
-constants:
-  home: /mnt/source/home/theenglishway
-  home_windows: /mnt/source/C/Users/Julien
-
 repositories:
   - path: ssh://${STORAGE_BOX_USER}@${STORAGE_BOX_USER}.your-storagebox.de:23/./borg-repo
     label: hetzner
 
 remote_path: borg-1.4
 ssh_command: ssh -i /var/run/secrets/${SSH_KEY_NAME}
+log_file: /root/.local/share/borgmatic/log
 
 encryption_passphrase: "{credential container ${BORG_PASSPHRASE_NAME}}"
 compression: lz4

+ 1 - 0
pc_backup/start.py

@@ -172,6 +172,7 @@ class BorgmaticContainer:
             "borg_config:/root/.config/borg",
             "borg_cache:/root/.cache/borg",
             "borgmatic_state:/root/.local/state/borgmatic",
+            "borgmatic_log:/root/.local/share/borgmatic",
         ]
         if config.ssh_auth_sock:
             volumes += [f"{config.ssh_auth_sock}:{config.ssh_auth_sock}:Z"]

+ 1 - 1
pyproject.toml

@@ -1,6 +1,6 @@
 [project]
 name = "pc_backup"
-version = "0.1.0"
+version = "0.2.0"
 description = "My backup solution"
 readme = "README.md"
 requires-python = ">=3.9"