Przeglądaj źródła

Reorganize source dir

jherve 1 miesiąc temu
rodzic
commit
8e97f613d1
4 zmienionych plików z 13 dodań i 4 usunięć
  1. 2 0
      .gitignore
  2. 3 2
      data/borgmatic.d/config.yaml
  3. 0 0
      data/source/.gitkeep
  4. 8 2
      start.sh

+ 2 - 0
.gitignore

@@ -0,0 +1,2 @@
+data/source/*/
+data/.bash_history

+ 3 - 2
data/borgmatic.d/config.yaml

@@ -1,8 +1,9 @@
 source_directories:
-    - /mnt/home/theenglishway/Documents/cv
-    - /mnt/home/theenglishway/Documents/formations/5_jours
+    - /mnt/source/home/theenglishway/Documents/cv
+    - /mnt/source/home/theenglishway/Documents/formations/5_jours
 repositories:
     - path: ssh://u505981@u505981.your-storagebox.de:23/./borg-repo
+
 one_file_system: true
 remote_path: borg-1.4
 

+ 0 - 0
data/source/.gitkeep


+ 8 - 2
start.sh

@@ -4,6 +4,12 @@ set -eu -o pipefail
 
 HOSTNAME=$(hostname)
 CONTAINER_NAME="borgmatic"
+HISTFILE=./data/.bash_history
+SOURCE_DIR=./data/source
+
+touch ${HISTFILE}
+
+sudo mount --bind /home/ ${SOURCE_DIR}/home
 
 # Some of those volumes seem useless, e.g. : 
 #   * the repository (which can be mounted within the container)
@@ -13,10 +19,10 @@ podman run \
   --replace \
   --detach \
   --name ${CONTAINER_NAME} \
-  -v /home/:/mnt/home:ro \
-  -v ./data/repository:/mnt/borg-repository \
+  -v ${SOURCE_DIR}:/mnt/source:ro \
   -v ./data/borgmatic.d:/etc/borgmatic.d/ \
   -v /home/theenglishway/.ssh:/root/.ssh \
+  -v ${HISTFILE}:/root/.bash_history \
   -v borg_config:/root/.config/borg \
   -v borg_cache:/root/.cache/borg \
   -v borgmatic_state:/root/.local/state/borgmatic \