L0rdRaiden
-
Posts
568 -
Joined
-
Last visited
Content Type
Profiles
Forums
Downloads
Store
Gallery
Bug Reports
Documentation
Landing
Posts posted by L0rdRaiden
-
-
On 4/18/2023 at 8:45 PM, mgutt said:
All files in appdata are extremely sensitive regarding user permissions. MariaDB official does not run as root. It runs with unraids default user permissions 99 (nobody) and group 100 (users):
Here is an example of one of my installations:
And how did you copy them to the UD SSD? And how is it formatted? If its not a Linux filesystem, all file permissions are lost.
At first check your permissions:
find /mnt/user/appdata/mariadb-official -ls
In the next step correct the permissions if needed:
chmod 777 /mnt/user/appdata/mariadb-official/config
chmod 777 /mnt/user/appdata/mariadb-official/data
chown root:root /mnt/user/appdata/mariadb-official/config
chown root:root /mnt/user/appdata/mariadb-official/data
find /mnt/user/appdata/mariadb-official -mindepth 2 -exec chown -v 99:100 {} \;
find /mnt/user/appdata/mariadb-official -mindepth 2 -type d -exec chmod -v 700 {} \;
find /mnt/user/appdata/mariadb-official -mindepth 2 -type f -exec chmod -v 660 {} \;
So is that the right way to configure the permissions?
How would you do that in a docker compose setup? I'm using PUID and PGID variables but this aren't officially supported by the image.
The values of the env variables and in a separated .env file
I have configure it like this but I get an error
MariaDBNC | 2023-04-28 14:55:39+02:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.6.12+maria~ubu2004 started.
MariaDBNC | 2023-04-28 14:55:40+02:00 [Note] [Entrypoint]: Initializing database files
MariaDBNC | 2023-04-28 14:55:40 0 [Warning] Can't create test file /var/lib/mysql/015ed9479080.lower-test
MariaDBNC | 2023-04-28 14:55:40 0 [ERROR] mariadbd: Can't create/write to file '/var/lib/mysql/aria_log_control' (Errcode: 13 "Permission denied")
MariaDBNC | 2023-04-28 14:55:40 0 [ERROR] mariadbd: Got error 'Can't create file' when trying to use aria control file '/var/lib/mysql/aria_log_control'COMPOSE
mariadb:
image: mariadb:10.6
container_name: MariaDBNC
restart: unless-stoppeduser: 99:100
command: --transaction-isolation=READ-COMMITTED --log-bin=binlog --binlog-format=ROW
healthcheck:
test: ["CMD-SHELL", "mysql nextcloud -u$MYSQL_USER -p$MYSQL_PASSWORD -e 'SELECT 1;' || exit 1"]
interval: 2s
retries: 120
volumes:
- /mnt/user/Docker/Nextcloud/mariadb:/var/lib/mysql
environment:
- TZ
- MYSQL_ROOT_PASSWORD
- MYSQL_PASSWORD
- MYSQL_DATABASE
- MYSQL_USER
- MARIADB_AUTO_UPGRADE=1
- MARIADB_DISABLE_UPGRADE_BACKUP=1
networks:
- nextcloud_network
labels:
- "com.centurylinklabs.watchtower.enable=true" -
I think is time to take to really consider this request.
- There is a real demand therefore the community did the compose manager plugin but is not fully integrated or supported
- Is an standard and dockerman is just a docker run template that only unraid uses.
- From an architecture point of view it makes sense and simplify the maintenance of Unraid
- It has more features and many things can't be done with dockerman
- Deploying certain systems that requires several containers and relationships between them is a nightmare with dockerman
- Is easier to maintain and share the configuration
- 1
-
I'm trying to update the dokcers in the compose above using watchtower but when It tries I get this error
The container has access to internet so I can't really figure out what the problem is
time="2023-04-25T01:01:10+02:00" level=warning msg="Could not do a head request for \"nextcloud:fpm-alpine\", falling back to regular pull." container=/Nextcloud image="nextcloud:fpm-alpine" time="2023-04-25T01:01:10+02:00" level=warning msg="Reason: Get \"https://index.docker.io/v2/\": net/http: TLS handshake timeout" container=/Nextcloud image="nextcloud:fpm-alpine" time="2023-04-25T01:01:20+02:00" level=info msg="Unable to update container \"/Nextcloud\": Error response from daemon: Get \"https://registry-1.docker.io/v2/\": net/http: TLS handshake timeout. Proceeding to next." time="2023-04-25T01:01:30+02:00" level=warning msg="Could not do a head request for \"nextcloud:fpm-alpine\", falling back to regular pull." container=/CronNC image="nextcloud:fpm-alpine" time="2023-04-25T01:01:30+02:00" level=warning msg="Reason: Get \"https://index.docker.io/v2/\": net/http: TLS handshake timeout" container=/CronNC image="nextcloud:fpm-alpine" time="2023-04-25T01:01:40+02:00" level=info msg="Unable to update container \"/CronNC\": Error response from daemon: Get \"https://registry-1.docker.io/v2/\": net/http: TLS handshake timeout. Proceeding to next." time="2023-04-25T01:01:50+02:00" level=warning msg="Could not do a head request for \"mariadb:10.6\", falling back to regular pull." container=/MariaDBNC image="mariadb:10.6" time="2023-04-25T01:01:50+02:00" level=warning msg="Reason: Get \"https://index.docker.io/v2/\": net/http: TLS handshake timeout" container=/MariaDBNC image="mariadb:10.6" time="2023-04-25T01:02:00+02:00" level=info msg="Unable to update container \"/MariaDBNC\": Error response from daemon: Get \"https://registry-1.docker.io/v2/\": net/http: TLS handshake timeout. Proceeding to next." time="2023-04-25T01:02:10+02:00" level=warning msg="Could not do a head request for \"redis:alpine\", falling back to regular pull." container=/RedisNC image="redis:alpine" time="2023-04-25T01:02:10+02:00" level=warning msg="Reason: Get \"https://index.docker.io/v2/\": net/http: TLS handshake timeout" container=/RedisNC image="redis:alpine" time="2023-04-25T01:02:20+02:00" level=info msg="Unable to update container \"/RedisNC\": Error response from daemon: Get \"https://registry-1.docker.io/v2/\": net/http: TLS handshake timeout. Proceeding to next." time="2023-04-25T01:02:20+02:00" level=info msg="Session done" Failed=0 Scanned=4 Updated=0 notify=no time="2023-04-25T02:01:10+02:00" level=warning msg="Could not do a head request for \"nextcloud:fpm-alpine\", falling back to regular pull." container=/Nextcloud image="nextcloud:fpm-alpine" time="2023-04-25T02:01:10+02:00" level=warning msg="Reason: Get \"https://index.docker.io/v2/\": net/http: TLS handshake timeout" container=/Nextcloud image="nextcloud:fpm-alpine" time="2023-04-25T02:01:20+02:00" level=info msg="Unable to update container \"/Nextcloud\": Error response from daemon: Get \"https://registry-1.docker.io/v2/\": net/http: TLS handshake timeout. Proceeding to next." time="2023-04-25T02:01:30+02:00" level=warning msg="Could not do a head request for \"nextcloud:fpm-alpine\", falling back to regular pull." container=/CronNC image="nextcloud:fpm-alpine" time="2023-04-25T02:01:30+02:00" level=warning msg="Reason: Get \"https://index.docker.io/v2/\": net/http: TLS handshake timeout" container=/CronNC image="nextcloud:fpm-alpine" time="2023-04-25T02:01:40+02:00" level=info msg="Unable to update container \"/CronNC\": Error response from daemon: Get \"https://registry-1.docker.io/v2/\": net/http: TLS handshake timeout. Proceeding to next." time="2023-04-25T02:01:50+02:00" level=warning msg="Could not do a head request for \"mariadb:10.6\", falling back to regular pull." container=/MariaDBNC image="mariadb:10.6" time="2023-04-25T02:01:50+02:00" level=warning msg="Reason: Get \"https://index.docker.io/v2/\": net/http: TLS handshake timeout" container=/MariaDBNC image="mariadb:10.6" time="2023-04-25T02:02:00+02:00" level=info msg="Unable to update container \"/MariaDBNC\": Error response from daemon: Get \"https://registry-1.docker.io/v2/\": net/http: TLS handshake timeout. Proceeding to next." time="2023-04-25T02:02:10+02:00" level=warning msg="Could not do a head request for \"redis:alpine\", falling back to regular pull." container=/RedisNC image="redis:alpine" time="2023-04-25T02:02:10+02:00" level=warning msg="Reason: Get \"https://index.docker.io/v2/\": net/http: TLS handshake timeout" container=/RedisNC image="redis:alpine" time="2023-04-25T02:02:20+02:00" level=info msg="Unable to update container \"/RedisNC\": Error response from daemon: Get \"https://registry-1.docker.io/v2/\": net/http: TLS handshake timeout. Proceeding to next."
If I try to access to the url https://registry-1.docker.io/v2/
I get this
-
14 hours ago, primeval_god said:
PGID and PUID have to be supported by the container. In the compose file above i see that the environment section for each container has empty PGID and PUID entries. Did you add those in or were they there already? If they were already there then you just need to assign the correct values to them.
the values are in a env file, but the permissions aren't being applied probably because the containers don't support it. I'm using the official containers and although I have included PGID an PUID I don't see them as supported in the official documentation
-
11 hours ago, primeval_god said:
Yes. The unraid os does not make use of users and groups the way generic linux distros do. For docker purposes you should use the user nobody "PUID, PGID 99 and 100"
and is there a way to force the docker compose above to do that? or it must be natively supported by the image?
-
Can some with experience in docker compose help me with this?
It's related with this docker compose
############################################################### # Nextcloud ############################################################### version: '3.8' # Networks #################################################### networks: br1: driver: macvlan external: true nextcloud_network: internal: true # Services #################################################### services: mariadb: image: mariadb:10.6 container_name: MariaDBNC restart: unless-stopped command: --transaction-isolation=READ-COMMITTED --log-bin=binlog --binlog-format=ROW healthcheck: test: ["CMD-SHELL", "mysql nextcloud -u$MYSQL_USER -p$MYSQL_PASSWORD -e 'SELECT 1;' || exit 1"] interval: 2s retries: 120 volumes: - /mnt/user/Docker/Nextcloud/mariadb:/var/lib/mysql environment: - TZ - PUID - PGID - MYSQL_ROOT_PASSWORD - MYSQL_PASSWORD - MYSQL_DATABASE - MYSQL_USER - MARIADB_AUTO_UPGRADE=1 - MARIADB_DISABLE_UPGRADE_BACKUP=1 networks: - nextcloud_network labels: - "com.centurylinklabs.watchtower.enable=true" redis: image: redis:alpine container_name: RedisNC restart: unless-stopped command: redis-server --requirepass $REDIS_HOST_PASSWORD volumes: - /mnt/user/Docker/Nextcloud/redis:/data environment: - TZ - PUID - PGID networks: - nextcloud_network labels: - "com.centurylinklabs.watchtower.enable=true" app: image: nextcloud:fpm-alpine container_name: Nextcloud restart: unless-stopped depends_on: mariadb: condition: service_healthy volumes: - /mnt/user/Docker/Nextcloud/nextcloud:/var/www/html - /mnt/user/Docker/Nextcloud/nextcloud/config:/var/www/html/config - /mnt/user/Media/Nextcloud:/var/www/html/data - type: tmpfs target: /tmp tmpfs: size: 1000000000 environment: - TZ - PUID - PGID - MYSQL_PASSWORD - MYSQL_DATABASE - MYSQL_USER - MYSQL_HOST=mariadb - REDIS_HOST=redis - REDIS_HOST_PASSWORD networks: - nextcloud_network labels: - "com.centurylinklabs.watchtower.enable=true" web: build: ./web container_name: Nginx-fpm restart: always networks: nextcloud_network: br1: ipv4_address: 10.10.40.160 ports: - 8080:80 volumes: - /mnt/user/Docker/Nextcloud/nextcloud:/var/www/html:ro environment: - TZ - PUID - PGID depends_on: - app cron: image: nextcloud:fpm-alpine container_name: CronNC restart: unless-stopped depends_on: - mariadb - redis volumes: - /mnt/user/Docker/Nextcloud/nextcloud:/var/www/html environment: - TZ - PUID - PGID networks: - nextcloud_network entrypoint: /cron.sh labels: - "com.centurylinklabs.watchtower.enable=true"
-
can I get an answer to this please?
Should I use PUID, PGID 99 and 100 for all the containers?
I'm starting to use compose with official docker images and the users appears as unknown and I am using
- PUID=1000
- PGID=100
but is not being applied.
What this means in terms of permissions? why the correct permissions aren't being applied?
What is the correct/safe way to do this?
This is the docker compose
############################################################### # Nextcloud ############################################################### version: '3.8' # Networks #################################################### networks: br1: driver: macvlan external: true nextcloud_network: internal: true # Services #################################################### services: mariadb: image: mariadb:10.6 container_name: MariaDBNC restart: unless-stopped command: --transaction-isolation=READ-COMMITTED --log-bin=binlog --binlog-format=ROW healthcheck: test: ["CMD-SHELL", "mysql nextcloud -u$MYSQL_USER -p$MYSQL_PASSWORD -e 'SELECT 1;' || exit 1"] interval: 2s retries: 120 volumes: - /mnt/user/Docker/Nextcloud/mariadb:/var/lib/mysql environment: - TZ - PUID - PGID - MYSQL_ROOT_PASSWORD - MYSQL_PASSWORD - MYSQL_DATABASE - MYSQL_USER - MARIADB_AUTO_UPGRADE=1 - MARIADB_DISABLE_UPGRADE_BACKUP=1 networks: - nextcloud_network labels: - "com.centurylinklabs.watchtower.enable=true" redis: image: redis:alpine container_name: RedisNC restart: unless-stopped command: redis-server --requirepass $REDIS_HOST_PASSWORD volumes: - /mnt/user/Docker/Nextcloud/redis:/data environment: - TZ - PUID - PGID networks: - nextcloud_network labels: - "com.centurylinklabs.watchtower.enable=true" app: image: nextcloud:fpm-alpine container_name: Nextcloud restart: unless-stopped depends_on: mariadb: condition: service_healthy volumes: - /mnt/user/Docker/Nextcloud/nextcloud:/var/www/html - /mnt/user/Docker/Nextcloud/nextcloud/config:/var/www/html/config - /mnt/user/Media/Nextcloud:/var/www/html/data - type: tmpfs target: /tmp tmpfs: size: 1000000000 environment: - TZ - PUID - PGID - MYSQL_PASSWORD - MYSQL_DATABASE - MYSQL_USER - MYSQL_HOST=mariadb - REDIS_HOST=redis - REDIS_HOST_PASSWORD networks: - nextcloud_network labels: - "com.centurylinklabs.watchtower.enable=true" web: build: ./web container_name: Nginx-fpm restart: always networks: nextcloud_network: br1: ipv4_address: 10.10.40.160 ports: - 8080:80 volumes: - /mnt/user/Docker/Nextcloud/nextcloud:/var/www/html:ro environment: - TZ - PUID - PGID depends_on: - app cron: image: nextcloud:fpm-alpine container_name: CronNC restart: unless-stopped depends_on: - mariadb - redis volumes: - /mnt/user/Docker/Nextcloud/nextcloud:/var/www/html environment: - TZ - PUID - PGID networks: - nextcloud_network entrypoint: /cron.sh labels: - "com.centurylinklabs.watchtower.enable=true"
-
Any idea why I'm getting this error when I do compose UP or DOWN?
Apr 20 16:20:00 Unraid nginx: 2023/04/20 16:20:00 [error] 18251#18251: *4620476 connect() to unix:/var/tmp/compose_manager_action.sock failed (111: Connection refused) while connecting to upstream, client: 10.10.10.23, server: 10-10-10-5.e0eacb8df486bfb2253b8048c08468d2ab8ec813.myunraid.net, request: "GET /logterminal/compose_manager_action/token HTTP/2.0", upstream: "http://unix:/var/tmp/compose_manager_action.sock:/token", host: "10-10-10-5.e0eacb8df486bfb2253b8048c08468d2ab8ec813.myunraid.net", referrer: "https://10-10-10-5.e0eacb8df486bfb2253b8048c08468d2ab8ec813.myunraid.net/logterminal/compose_manager_action/"
Apr 20 16:20:01 Unraid nginx: 2023/04/20 16:20:01 [error] 18251#18251: *4620590 connect() to unix:/var/tmp/compose_manager_action.sock failed (111: Connection refused) while connecting to upstream, client: 10.10.10.23, server: 10-10-10-5.e0eacb8df486bfb2253b8048c08468d2ab8ec813.myunraid.net, request: "GET /logterminal/compose_manager_action/ws HTTP/1.1", upstream: "http://unix:/var/tmp/compose_manager_action.sock:/ws", host: "10-10-10-5.e0eacb8df486bfb2253b8048c08468d2ab8ec813.myunraid.net"version: '3.8' networks: br1: external: true nextcloud_network: driver: bridge services: mariadb: image: mariadb:10.6 container_name: MariaDBNC restart: unless-stopped command: --transaction-isolation=READ-COMMITTED --log-bin=binlog --binlog-format=ROW healthcheck: test: ["CMD-SHELL", "mysql nextcloud -unextcloud -psssssssssssss -e 'SELECT 1;' || exit 1"] interval: 2s retries: 120 volumes: - /mnt/user/Docker/Nextcloud/mariadb:/var/lib/mysql environment: - TZ=Europe/Madrid - MYSQL_ROOT_PASSWORD=sssssssssssssss - MYSQL_PASSWORD=sssssssssssssssss - MYSQL_DATABASE=nextcloud - MYSQL_USER=nextcloud - MARIADB_AUTO_UPGRADE=1 - MARIADB_DISABLE_UPGRADE_BACKUP=1 networks: - nextcloud_network dns: - 10.10.40.5 labels: - "com.centurylinklabs.watchtower.enable=true" redis: image: redis:alpine container_name: RedisNC restart: unless-stopped command: redis-server --requirepass ssssssssssssssssssss volumes: - /mnt/user/Docker/Nextcloud/redis:/data environment: - TZ=Europe/Madrid - PUID=1000 - PGID=100 networks: - nextcloud_network dns: - 10.10.40.5 labels: - "com.centurylinklabs.watchtower.enable=true" nextcloud: image: nextcloud:apache container_name: Nextcloud restart: unless-stopped depends_on: mariadb: condition: service_healthy volumes: - /mnt/user/Docker/Nextcloud/nextcloud:/var/www/html - /mnt/user/Media/Nextcloud:/var/www/html/data - type: tmpfs target: /tmp tmpfs: size: 1000000000 environment: - TZ=Europe/Madrid - PUID=1000 - PGID=100 - UMASK=022 - MYSQL_PASSWORD=sssssssssssssssss - MYSQL_DATABASE=nextcloud - MYSQL_USER=nextcloud - MYSQL_HOST=mariadb - REDIS_HOST=redis - REDIS_HOST_PASSWORD=sssssssssssss networks: nextcloud_network: br1: ipv4_address: 10.10.40.160 dns: - 10.10.40.5 labels: - "com.centurylinklabs.watchtower.enable=true"
Another issue I have is that the first time I put the WebUI label I did http://[IP]:[PORT:443]/ by mistake, I have changed it to http://[IP]:[PORT:80]/ and http://[IP] but I still get this in the webui
Thanks in advance
-
I'm trying to get access to /boot from a code-server docker in order to edit directly the docker compose files.
When I map the folder I get an access error telling me that I don't have the permissions to do it, I'm sure this can be done but how?
Thanks in advance.
-
Can anyone help me with this docker compose?
I have my dockers in general with a fixed IP on my network in the internface br1, I use macvlan
This is my typical network config
So I want nextcloud to have a fixed IP in my network and communicate with the other dockers, redis, mariadb, over an internal docker network no published in my network.
This is my coked compose file, but I'm not sure how to configure the network part, or what is the purpose of the volumen parameter at the beginning. I would appreciate any help or any other improvement you might see.
version: '3.3' volumes: Nextcloud: #volumen a la izquierda de los : Media: mariadb: redis: networks: br1: external: true nextcloud_network: driver: bridge services: db: image: mariadb:10.6 restart: unless-stopped command: --transaction-isolation=READ-COMMITTED --log-bin=binlog --binlog-format=ROW volumes: - /mnt/user/Docker/Nextcloud/mariadb:/var/lib/mysql environment: - TZ=Europe/Paris - MYSQL_ROOT_PASSWORD=random_msql_root_password - MYSQL_PASSWORD=must_match_1 - MYSQL_DATABASE=must_match_2 - MYSQL_USER=must_match_3 - MARIADB_AUTO_UPGRADE=1 - MARIADB_DISABLE_UPGRADE_BACKUP=1 networks: - nextcloud_network dns: - 10.10.40.5 labels: - "com.centurylinklabs.watchtower.enable=true" redis: image: redis:alpine restart: unless-stopped command: redis-server --requirepass someredispassword volumes: - /mnt/user/Docker/Nextcloud/redis:/data networks: - nextcloud_network dns: - 10.10.40.5 labels: - "com.centurylinklabs.watchtower.enable=true" nextcloud: image: nextcloud:apache restart: unless-stopped depends_on: - db - redis volumes: - /mnt/user/Docker/Nextcloud:/var/www/html - /mnt/user/Media:/var/www/html/data - type: tmpfs target: /tmp environment: - TZ=Europe/Paris - PUID=99 - PGID=100 - UMASK=022 - MYSQL_PASSWORD=must_match_1 - MYSQL_DATABASE=must_match_2 - MYSQL_USER=must_match_3 - MYSQL_HOST=db - REDIS_HOST=redis - REDIS_HOST_PASSWORD=someredispassword networks: nextcloud_network: br1: ipv4_address: 10.10.40.160 ports: - 8080:80 dns: - 10.10.40.5 labels: - "com.centurylinklabs.watchtower.enable=true"
-
Is there a way to have health information of a SSD in a % way or something? I would like to be able to predict when could fail.
I have Scrutiny and I have run Smart but only provides info if something has already failed, there is no data about TBW or anything like that.
Crystal Disk info gives you a % is there a similar solution or a way to get an estimation of the health of a drive?
-
the current version in unraid of docker compose is 2.11.2 are there any plans to update to 2.17.2? this depends on this plugins or unraid?
when in a docker compose file says "version: "3"" is this related with the docker compose version supported or with this?
https://docs.docker.com/compose/compose-file/compose-file-v3/
Or what should I use as default? 3.8? 3.9?
-
If someone is interested this is an improved version
#!/bin/bash # Define variables for frequently changing values MONITORED_PATH="/mnt/user/Storage/CCTV" DESTINATION_PATH="/Backup/CCTV" SYNC_OPTION="--update" rclonelog="/mnt/user/Storage/CCTV/rclonelog/rclonelog_$(date +%Y-%m-%d_%H-%M-%S).txt" LOG_PATTERN="Transferred:|Checks:|Deleted:|Elapsed time:|warning:|error:" # Delete logs older than 30 days find /mnt/user/Storage/CCTV -name "rclonelog_*.txt" -type f -mtime +30 -delete # Wait until a file is created inotifywait -m -r --exclude "$rclonelog" -e create --format "%w%f" "$MONITORED_PATH" | while read file_path; do # Check if the event generated corresponds to a file creation if [[ -f "$file_path" ]]; then # Print a message indicating that a new file was created and synchronize with the destination echo "A new file has been created: $file_path. Synchronizing with $DESTINATION_PATH ..." /usr/local/emhttp/webGui/scripts/notify -e "Unraid Server Notice" -s "CCTV sync" -d "A new file has been created $file_path" -i "normal" # Synchronize with the destination using rclone rclone sync "$MONITORED_PATH" onedriveguillermo:"$DESTINATION_PATH" $SYNC_OPTION --log-file="$rclonelog" --log-level INFO echo "Synchronization completed" /usr/local/emhttp/webGui/scripts/notify -e "Unraid Server Notice" -s "CCTV sync" -d "Synchronization completed\n$(grep -E "$LOG_PATTERN" "$rclonelog")" fi done
-
I have seen many chages in the base script that comes by default in user scripts.
What is the best version right now?
I just want to sync a folder where CCTV videos are store to ondrive. Maybe something like this could be better?
#!/bin/bash # Path to monitor (Ruta que deseas monitorear) monitored_path="/user/Storage/CCTV/recordings" # Configuring the destination path in rclone (Configurar la ruta de destino en rclone) destination_path="destination_name_in_rclone:" # Wait until a file is created (Esperar hasta que se cree un archivo) inotifywait -m -r --exclude '.*/*/*/*/*/*' -e create --format "%w%f" "$monitored_path" | while read file_path; do # Check if the event generated corresponds to a file creation (Verificar si el evento generado corresponde a la creación de un archivo) if [[ -f "$file_path" ]]; then # Print a message indicating that a new file was created and synchronize with the destination (Imprimir un mensaje indicando que se ha creado un nuevo archivo y sincronizar con la ruta de destino) echo "A new file has been created: $file_path. Synchronizing with $destination_path ..." rclone sync "$monitored_path" "$destination_path" --update fi done
-
On 2/21/2021 at 12:40 AM, CS01-HS said:
Thanks but I meant a console command (I'm trying to script something.)
Hi, did you find a solution? if yes, do you mind to share that part of the script?
- 1
-
28 minutes ago, blaine07 said:
Sorry, I know this is a lot, but can you provide any instructions on how you're doing this exactly?
Maybe use watchtower?
-
In case is useful for someone this is how ended up my script for backup with Kopia and rclone sync
#!/bin/bash #### DOCKERS AND VMs STOP #### /usr/local/emhttp/webGui/scripts/notify -e "Unraid Server Notice" -s "Backup process started" -d "Start Kopia and stopping containers" -i "normal" docker start Kopia virsh shutdown AlmaLinux docker stop -t 120 HomeAssistant docker stop -t 120 MariaDBHA sleep 60s #### KOPIA BACKUP START #### /usr/local/emhttp/webGui/scripts/notify -e "Unraid Server Notice" -s "Kopia backup started" -d "Kopia backup to drive" -i "normal" docker exec Kopia kopia snapshot create /app/data/Backup/UnraidOS docker exec Kopia kopia snapshot create /app/data/Docker docker exec Kopia kopia snapshot create /app/data/VMDisks/libvirt docker exec Kopia kopia snapshot create /app/data/VMDisks/AlmaLinux sleep 10s #### RCLONE SYNC START #### /usr/local/emhttp/webGui/scripts/notify -e "Unraid Server Notice" -s "Rclone backup started" -d "Synchronizing backup to OneDrive" -i "normal" rclonelog="/mnt/user/Backup/Kopia/rclonelog.txt" rm $rclonelog rclone sync /mnt/user/Backup/Kopia onedrive:"/Backup/Kopia" --log-file=$rclonelog --log-level INFO #NOTICE Transfered1=$(grep "Transferred:" $rclonelog | grep "MiB" | tail -n 1) Checks=$(grep "Checks:" $rclonelog | tail -n 1) Deleted=$(grep "Deleted:" $rclonelog | tail -n 1) Transferred2=$(grep "Transferred:" $rclonelog | tail -n 1) Elapsedtime=$(grep "Elapsed time:"$rclonelog | tail -n 1) Warning=$(grep "warning:" $rclonelog | tail -n 1) Error=$(grep "error:" $rclonelog | tail -n 1) /usr/local/emhttp/webGui/scripts/notify -d "$Transfered1<br>$Checks<br>$Deleted<br>$Transferred2<br>$Elapsedtime<br>$Warning<br>$Error" #### DOCKERS AND VMs START #### virsh start AlmaLinux docker start MariaDBHA sleep 60s docker start HomeAssistant docker stop Kopia /usr/local/emhttp/webGui/scripts/notify -e "Unraid Server Notice" -s "Backup finished" -d "Synchronization completed" -i "normal"
my next pending task is to find out how to get some output of the result of the backups in KOPIA to send a notification, similar to what I did with Rclone
-
I'm writting a script to stop all runing containers and one VM, launch backup, start containers and VM and sync backup to onedrive.
So I have most of it but is there a way to start only the dockers that were previosly started? basically I want to start only the containers with the autostart setting, I know I can type all the containers manually but I don't want to maintain the code and I would like something more automatic.
The other question is what is the command to gracefully shutdown and start a VM?
-
-
Any idea why I am getting this error?
It happens when I click here to start the donwload. All the integration works, lists, indexers, clients and Radarr health repport is clean.
Message An unhandled exception has occurred while executing the request.: The SSL connection could not be established, see inner exception. Exception System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception. ---> System.IO.IOException: Cannot determine the frame size or a corrupted frame was received. at System.Net.Security.SslStream.GetFrameSize(ReadOnlySpan`1 buffer) at System.Net.Security.SslStream.ReceiveBlobAsync[TIOAdapter](TIOAdapter adapter) at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](TIOAdapter adapter, Boolean receiveFirst, Byte[] reAuthenticationData, Boolean isApm) at System.Net.Http.ConnectHelper.EstablishSslConnectionAsync(SslClientAuthenticationOptions sslOptions, HttpRequestMessage request, Boolean async, Stream stream, CancellationToken cancellationToken) --- End of inner exception stack trace --- at System.Net.Http.ConnectHelper.EstablishSslConnectionAsync(SslClientAuthenticationOptions sslOptions, HttpRequestMessage request, Boolean async, Stream stream, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(HttpRequestMessage request) at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellation(CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.GetHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken) at System.Net.Http.AuthenticationHelper.SendWithAuthAsync(HttpRequestMessage request, Uri authUri, Boolean async, ICredentials credentials, Boolean preAuthenticate, Boolean isProxyAuth, Boolean doRequestAuth, HttpConnectionPool pool, CancellationToken cancellationToken) at System.Net.Http.HttpMessageHandlerStage.Send(HttpRequestMessage request, CancellationToken cancellationToken) at System.Net.Http.DiagnosticsHandler.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.DecompressionHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpMessageHandlerStage.Send(HttpRequestMessage request, CancellationToken cancellationToken) at System.Net.Http.SocketsHttpHandler.Send(HttpRequestMessage request, CancellationToken cancellationToken) at System.Net.Http.HttpMessageInvoker.Send(HttpRequestMessage request, CancellationToken cancellationToken) at System.Net.Http.HttpClient.Send(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationToken cancellationToken) at NzbDrone.Common.Http.Dispatchers.ManagedHttpDispatcher.GetResponse(HttpRequest request, CookieContainer cookies) in D:\a\1\s\src\NzbDrone.Common\Http\Dispatchers\ManagedHttpDispatcher.cs:line 101 at NzbDrone.Common.Http.HttpClient.ExecuteRequest(HttpRequest request, CookieContainer cookieContainer) in D:\a\1\s\src\NzbDrone.Common\Http\HttpClient.cs:line 124 at NzbDrone.Common.Http.HttpClient.Execute(HttpRequest request) in D:\a\1\s\src\NzbDrone.Common\Http\HttpClient.cs:line 59 at NzbDrone.Common.Http.HttpClient.Get(HttpRequest request) in D:\a\1\s\src\NzbDrone.Common\Http\HttpClient.cs:line 282 at NzbDrone.Core.Download.TorrentClientBase`1.DownloadFromWebUrl(RemoteMovie remoteMovie, String torrentUrl) in D:\a\1\s\src\NzbDrone.Core\Download\TorrentClientBase.cs:line 136 at NzbDrone.Core.Download.TorrentClientBase`1.Download(RemoteMovie remoteMovie) in D:\a\1\s\src\NzbDrone.Core\Download\TorrentClientBase.cs:line 118 at NzbDrone.Core.Download.DownloadService.DownloadReport(RemoteMovie remoteMovie) in D:\a\1\s\src\NzbDrone.Core\Download\DownloadService.cs:line 73 at Radarr.Api.V3.Indexers.ReleaseController.DownloadRelease(ReleaseResource release) in D:\a\1\s\src\Radarr.Api.V3\Indexers\ReleaseController.cs:line 87 at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync() at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope) at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger) at Radarr.Http.Middleware.BufferingMiddleware.InvokeAsync(HttpContext context) in D:\a\1\s\src\Radarr.Http\Middleware\BufferingMiddleware.cs:line 28 at Radarr.Http.Middleware.IfModifiedMiddleware.InvokeAsync(HttpContext context) in D:\a\1\s\src\Radarr.Http\Middleware\IfModifiedMiddleware.cs:line 41 at Radarr.Http.Middleware.CacheHeaderMiddleware.InvokeAsync(HttpContext context) in D:\a\1\s\src\Radarr.Http\Middleware\CacheHeaderMiddleware.cs:line 33 at Radarr.Http.Middleware.UrlBaseMiddleware.InvokeAsync(HttpContext context) in D:\a\1\s\src\Radarr.Http\Middleware\UrlBaseMiddleware.cs:line 27 at Radarr.Http.Middleware.VersionMiddleware.InvokeAsync(HttpContext context) in D:\a\1\s\src\Radarr.Http\Middleware\VersionMiddleware.cs:line 28 at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context) at Microsoft.AspNetCore.Authorization.Policy.AuthorizationMiddlewareResultHandler.HandleAsync(RequestDelegate next, HttpContext context, AuthorizationPolicy policy, PolicyAuthorizationResult authorizeResult) at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.<Invoke>g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task)
Message Request Failed. POST /api/v3/release: The SSL connection could not be established, see inner exception. Exception System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception. ---> System.IO.IOException: Cannot determine the frame size or a corrupted frame was received. at System.Net.Security.SslStream.GetFrameSize(ReadOnlySpan`1 buffer) at System.Net.Security.SslStream.ReceiveBlobAsync[TIOAdapter](TIOAdapter adapter) at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](TIOAdapter adapter, Boolean receiveFirst, Byte[] reAuthenticationData, Boolean isApm) at System.Net.Http.ConnectHelper.EstablishSslConnectionAsync(SslClientAuthenticationOptions sslOptions, HttpRequestMessage request, Boolean async, Stream stream, CancellationToken cancellationToken) --- End of inner exception stack trace --- at System.Net.Http.ConnectHelper.EstablishSslConnectionAsync(SslClientAuthenticationOptions sslOptions, HttpRequestMessage request, Boolean async, Stream stream, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(HttpRequestMessage request) at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellation(CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.GetHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken) at System.Net.Http.AuthenticationHelper.SendWithAuthAsync(HttpRequestMessage request, Uri authUri, Boolean async, ICredentials credentials, Boolean preAuthenticate, Boolean isProxyAuth, Boolean doRequestAuth, HttpConnectionPool pool, CancellationToken cancellationToken) at System.Net.Http.HttpMessageHandlerStage.Send(HttpRequestMessage request, CancellationToken cancellationToken) at System.Net.Http.DiagnosticsHandler.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.DecompressionHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpMessageHandlerStage.Send(HttpRequestMessage request, CancellationToken cancellationToken) at System.Net.Http.SocketsHttpHandler.Send(HttpRequestMessage request, CancellationToken cancellationToken) at System.Net.Http.HttpMessageInvoker.Send(HttpRequestMessage request, CancellationToken cancellationToken) at System.Net.Http.HttpClient.Send(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationToken cancellationToken) at NzbDrone.Common.Http.Dispatchers.ManagedHttpDispatcher.GetResponse(HttpRequest request, CookieContainer cookies) in D:\a\1\s\src\NzbDrone.Common\Http\Dispatchers\ManagedHttpDispatcher.cs:line 101 at NzbDrone.Common.Http.HttpClient.ExecuteRequest(HttpRequest request, CookieContainer cookieContainer) in D:\a\1\s\src\NzbDrone.Common\Http\HttpClient.cs:line 124 at NzbDrone.Common.Http.HttpClient.Execute(HttpRequest request) in D:\a\1\s\src\NzbDrone.Common\Http\HttpClient.cs:line 59 at NzbDrone.Common.Http.HttpClient.Get(HttpRequest request) in D:\a\1\s\src\NzbDrone.Common\Http\HttpClient.cs:line 282 at NzbDrone.Core.Download.TorrentClientBase`1.DownloadFromWebUrl(RemoteMovie remoteMovie, String torrentUrl) in D:\a\1\s\src\NzbDrone.Core\Download\TorrentClientBase.cs:line 136 at NzbDrone.Core.Download.TorrentClientBase`1.Download(RemoteMovie remoteMovie) in D:\a\1\s\src\NzbDrone.Core\Download\TorrentClientBase.cs:line 118 at NzbDrone.Core.Download.DownloadService.DownloadReport(RemoteMovie remoteMovie) in D:\a\1\s\src\NzbDrone.Core\Download\DownloadService.cs:line 73 at Radarr.Api.V3.Indexers.ReleaseController.DownloadRelease(ReleaseResource release) in D:\a\1\s\src\Radarr.Api.V3\Indexers\ReleaseController.cs:line 87 at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync() at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope) at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger) at Radarr.Http.Middleware.BufferingMiddleware.InvokeAsync(HttpContext context) in D:\a\1\s\src\Radarr.Http\Middleware\BufferingMiddleware.cs:line 28 at Radarr.Http.Middleware.IfModifiedMiddleware.InvokeAsync(HttpContext context) in D:\a\1\s\src\Radarr.Http\Middleware\IfModifiedMiddleware.cs:line 41 at Radarr.Http.Middleware.CacheHeaderMiddleware.InvokeAsync(HttpContext context) in D:\a\1\s\src\Radarr.Http\Middleware\CacheHeaderMiddleware.cs:line 33 at Radarr.Http.Middleware.UrlBaseMiddleware.InvokeAsync(HttpContext context) in D:\a\1\s\src\Radarr.Http\Middleware\UrlBaseMiddleware.cs:line 27 at Radarr.Http.Middleware.VersionMiddleware.InvokeAsync(HttpContext context) in D:\a\1\s\src\Radarr.Http\Middleware\VersionMiddleware.cs:line 28 at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context) at Microsoft.AspNetCore.Authorization.Policy.AuthorizationMiddlewareResultHandler.HandleAsync(RequestDelegate next, HttpContext context, AuthorizationPolicy policy, PolicyAuthorizationResult authorizeResult) at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.<Invoke>g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task)
relevant: https://github.com/Radarr/Radarr/issues/7102
but proposed solution don't work
-
We don't even have docker compose as a native solution....
-
It is documented somewhere all the labels available?
Why when I click on ok the popup disapear and nothing happens? It's because is a still a empty docker compose? do I have to populated the compose yaml first?
What is the plan for unraid regarding docker compose? will they integrate it better or provide official support? having compose doesn't make sense use "dockerman", everything should be based on compose even if we have Unraid WEBUI on top. It would be easier to use and administrate and It is the market standard.
-
I have scanned the server and I got this "vulnerability" in the SMB config, it's a real issue or a FP? Is there something that can be improved?
Medium
SMB Signing not required
Description
Signing is not required on the remote SMB server. An unauthenticated, remote attacker can exploit this to conduct man-in-the-middle attacks against the SMB server.
Solution
Enforce message signing in the host's configuration. On Windows, this is found in the policy setting 'Microsoft network server: Digitally sign communications (always)'. On Samba, the setting is called 'server signing'. See the 'see also' links for further details.
See Also
http://www.nessus.org/u?df39b8b3
http://technet.microsoft.com/en-us/library/cc731957.aspx
http://www.nessus.org/u?74b80723
https://www.samba.org/samba/docs/current/man-html/smb.conf.5.html
http://www.nessus.org/u?a3cac4ea -
I have this script
#!/bin/bash /usr/local/emhttp/webGui/scripts/notify -e "Unraid Server Notice" -s "OneDrive backup started" -d "Synchronizing Kopia backup to OneDrive" -i "normal" echo 'OneDrive backup started' rclone sync /mnt/user/Backup/Kopia onedrive:"/Backup/Kopia" /usr/local/emhttp/webGui/scripts/notify -e "Unraid Server Notice" -s "OneDrive backup finished" -d "Synchronization completed" -i "normal" echo 'One Drive backup completed'
I would like to get aditional info via echo so I get it into unraid notification system and them to telegram bot.
If I add a -P in console it look like this
Is there a way to send this info via echo? to have some input about if it was successful or not.
Maybe creating a log, reading it echo the last lines, and deleting the log?
How all this could look like in a bash script, I don't know how to code it.
[Plugin] Docker Compose Manager
in Plugin Support
Posted
my script to update compose with user scripts and cron jobs.
Any feedback for improvement is welcome, I will improve it.