Parcourir la source

admin to volumes

lc il y a 1 an
Parent
commit
70bebea8cd
4 fichiers modifiés avec 46 ajouts et 19 suppressions
  1. 5 4
      .env
  2. 3 3
      backup_volumes.sh
  3. 30 6
      docker-compose.yml
  4. 8 6
      restore_volumes.sh

+ 5 - 4
.env

@@ -1,7 +1,8 @@
-STORAGE_ROOT=/home/orbitzs/projects/nc3/nextcloud_nc2
-DATA_VOLUME_ROOT=$STORAGE_ROOT/storage
 MYSQL_ROOT_PASSWORD=2eqQ6Rqs
 MYSQL_PASSWORD=123456
-CONTAINER_NAME=nc3
-DUPLICATI_BACKUP_LOC=/media/orbitzs/nextcloud_files/backup/nc2/duplicati/backups
+CONTAINER_NAME=nc4
 NEXTCLOUD_HOST=https://1984.algometic.com
+USERROOT_MICHELLE=/media/yaye/nextcloud_files/apex/michellechanpl
+USERROOT_JENNIFER=/media/yaye/nextcloud_files/apex/jennifer.pui
+USERROOT_MINDY=/media/yaye/nextcloud_files/apex/mindy.lui
+USERROOT_PLAYER1=/media/yaye/nextcloud_files/apex/player1

+ 3 - 3
backup_volumes.sh

@@ -36,12 +36,12 @@
 #
 
 # Variables
-BACKUP_DIR="/media/orbitzs/nextcloud_files/backup/nc2/docker_volumes"  # Change this to your desired backup directory
+BACKUP_DIR="/media/yaye/nextcloud_files/backup/nc2/docker_volumes"  # Change this to your desired backup directory
 TIMESTAMP=$(date +"%Y%m%d_%H%M%S")
 
 # List of volumes to backup
-VOLUMES=("nc3_files" "nc3_oo_data" "nc3_es_index" "nc3_db" "nc3_clamav")  # Replace with your volume names
-#VOLUMES=("nc3_redis" "nc3_oo_data" "nc3_es_index"  "nc3_clamav")  # Replace with your volume names
+VOLUMES=("nc4_files" "nc4_oo_data" "nc4_es_index" "nc4_db" "nc4_clamav")  # Replace with your volume names
+#VOLUMES=("nc4_redis" "nc4_oo_data" "nc4_es_index"  "nc4_clamav")  # Replace with your volume names
 
 # Ensure backup directory exists
 mkdir -p "$BACKUP_DIR"

+ 30 - 6
docker-compose.yml

@@ -2,6 +2,29 @@ version: '3'
 
 volumes:
 
+  files_michelle:
+    name: ${CONTAINER_NAME}_files_michelle
+    driver: local
+    driver_opts:
+      type: volume
+      o: 'bind'
+      device: ${USERROOT_MICHELLE} 
+
+  files_jennifer:
+    name: ${CONTAINER_NAME}_files_jennifer
+    driver: local
+    driver_opts:
+      type: volume
+      o: 'bind'
+      device: ${USERROOT_JENNIFER} 
+
+  files_mindy:
+    name: ${CONTAINER_NAME}_files_mindy
+    driver: local
+    driver_opts:
+      type: volume
+      o: 'bind'
+      device: ${USERROOT_MINDY} 
 
   files_player1:
     name: ${CONTAINER_NAME}_files_player1
@@ -9,15 +32,12 @@ volumes:
     driver_opts:
       type: volume
       o: 'bind'
-      device: "/media/orbitzs/nextcloud_files/apex/player1"
+      device: ${USERROOT_PLAYER1} 
 
   files:
     name: ${CONTAINER_NAME}_files
     driver: local
-    driver_opts: 
-      type: volume 
-      o: 'bind'
-      device: "${DATA_VOLUME_ROOT}/data"
+
   db:
     name: ${CONTAINER_NAME}_db
     driver: local
@@ -74,6 +94,9 @@ services:
     volumes:
       - files:/var/www/html
       - files_player1:/var/www/html/data/player1
+      - files_mindy:/var/www/html/data/mindy
+      - files_jennifer:/var/www/html/data/jennifer
+#      - files_player1:/var/www/html/data/michelle
     restart: "no" 
     environment:
       - REDIS_HOST=redis
@@ -97,7 +120,8 @@ services:
 
 
   es01:
-    image: docker.elastic.co/elasticsearch/elasticsearch:7.17.23
+#    image: docker.elastic.co/elasticsearch/elasticsearch:7.17.23
+    image: elasticsearch-ingest:latest 
     container_name: ${CONTAINER_NAME}_es 
     environment:
       - node.name=es01

+ 8 - 6
restore_volumes.sh

@@ -36,15 +36,17 @@
 
 
 # Variables
-BACKUP_DIR="/media/orbitzs/nextcloud_files/backup/nc2/docker_volumes"  # Change this to your desired backup directory
-TIMESTAMP="20250128_134937"  # Replace with your desired timestamp
+BACKUP_DIR="/media/yaye/nextcloud_files/backup/nc2/docker_volumes"  # Change this to your desired backup directory
+TIMESTAMP="20250129_100833"  # Replace with your desired timestamp
 
 
 # List of volumes to restore
-VOLUME=nc3
-NEW_VOLUME=nc3
-VOLUMES=("${VOLUME}_files" "${VOLUME}_oo_data"  "${VOLUME}_es_index" "${VOLUME}_db" "${VOLUME}_clamav")  # Replace with your original volume names
-NEW_VOLUMES=(${NEW_VOLUME}_files "${NEW_VOLUME}_oo_data"  "${NEW_VOLUME}_es_index" "${NEW_VOLUME}_db" "${NEW_VOLUME}_clamav")  # Replace with your new volume names
+VOLUME=nc4
+NEW_VOLUME=nc4
+#VOLUMES=("${VOLUME}_files" "${VOLUME}_oo_data"  "${VOLUME}_es_index" "${VOLUME}_db" "${VOLUME}_clamav")  # Replace with your original volume names
+#NEW_VOLUMES=(${NEW_VOLUME}_files "${NEW_VOLUME}_oo_data"  "${NEW_VOLUME}_es_index" "${NEW_VOLUME}_db" "${NEW_VOLUME}_clamav")  # Replace with your new volume names
+VOLUMES=("${VOLUME}_es_index")  # Replace with your original volume names
+NEW_VOLUMES=("${NEW_VOLUME}_es_index")  # Replace with your new volume names
 
 # Ensure backup directory exists
 mkdir -p "$BACKUP_DIR"