-
-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Containers skipped #326
Comments
Hi, It seems like Nautical is attempting to backup itself. I have some steps in place to prevent this but it seems like that isn't working. Could you add the following label to your Nautical config: "nautical-backup.enable=false"
"nautical-backup.stop-before-backup=false" If this fixes the problem, then I need to troubleshoot further as to why Nautical didn't skip itself. Could you also set the console LOG_LEVEL to TRACE and share what you find in the Docker console (not the backup report). Also, great use of the |
|
Thanks for sending me the logs. I think I may have misunderstood your issue before. Based on these logs, I can see that Nautical is not trying to back itself up nautical-backup | TRACE: Skipping nautical-backup c1f8057178d6b4fa25b84c8c17b06ee7ac5316c7dfc02fa60a2aeb1adc745e1a because it's image matches 'minituff/nautical-backup'.
nautical-backup | TRACE: Skipping nautical-backup c1f8057178d6b4fa25b84c8c17b06ee7ac5316c7dfc02fa60a2aeb1adc745e1a because it's image matches 'nautical-backup'.
nautical-backup | DEBUG: Skipping nautical-backup based on label The last log, "Shutting Down", was this caused by you shutting down the container? I think these logs are the most relevant to your issue. nautical-backup | DEBUG: Containers: nautical-backup, diun-diun-1, uptime-kuma, komodo_core_1, komodo_ferretdb_1, komodo_periphery_1
nautical-backup | DEBUG: komodo_core_1 - Source directory '/app/source/komodo_core_1' does not exist. Skipping
nautical-backup | DEBUG: komodo_ferretdb_1 - Source directory '/app/source/komodo_ferretdb_1' does not exist. Skipping
nautical-backup | DEBUG: komodo_periphery_1 - Source directory '/app/source/komodo_periphery_1' does not exist. Skipping Nautical is looking for a source folder that matches the container name. Since all your containers end in You have a few options to remedy this (You only need to choose 1).
# Nautical compose
OVERRIDE_SOURCE_DIR=komodo_core_1:komodo_core,komodo_ferretdb_1:komodo_ferretdb,komodo_periphery_1:komodo_periphery
Example: services:
komodo_core:
container_name: komodo_core
services:
komodo_core:
container_name: komodo_core
labels:
- nautical-backup.override-source-dir=komodo_core |
So that was after I put the tags in you suggested to keep it from reading nautical, and I'm unsure why my it's reading a _1 on my container names, that isn't in my directory structure or docker-compose.yml files |
It looks like the I haven't encountered this before myself, but you may need to do some tinkering to either remove the |
@Minituff I just wanted to chime in here and say I am also seeing this issue. I am seeing "-1" appended to all my containers which is resulting in skipped backups. I'll attach the logs at the bottom. I use Portainer to manage some containers, these are created in stacks. for example:
and data/compose
docker-compose:
nautical container runtime logs:
nautical config
|
Hi @IanWardell, Are you able to share some of your container configs as well? I'm wondering if you need to apply the |
I haven't added the container_naame property, but I can update them and see what happens. I did try the OVERRIDE_SOURCE_DIR= method and it didn't work. services:
nautical-backup:
image: minituff/nautical-backup:latest
container_name: nautical-backup
volumes:
- /var/run/docker.sock:/var/run/docker.sock # Required for Docker interaction
- /data/compose/:/app/source:ro # Mount all Docker volumes as the source
- /home/machine/nautical-backups/config:/config # Configuration directory
- /home/machine/nautical-backups/destination:/app/destination # Backup destination
environment:
- TZ=America/New_York
- BACKUP_ON_START=true
- RUN_ONCE=true
- CRON_SCHEDULE_ENABLED=false
- LOG_LEVEL=TRACE
- OVERRIDE_SOURCE_DIR=teslamate-deploy-teslamate-1:teslamate-deploy-teslamate
#DEBUG: Containers skipped: ovpn-admin-openvpn-1, nginx, teslamate-deploy-teslamate-1, zm_db, buildx_buildkit_default, zoneminder, teslamate-deploy-mosquitto-1, ovpn-admin-ovpn-admin-1, portainer_portainer_1, nautical-backup, teslamate-deploy-database-1, teslamate-deploy-grafana-1 here is an example docker-compose version: "3"
services:
teslamate:
image: teslamate/teslamate:latest
restart: always
environment:
- ENCRYPTION_KEY=[REDACTED]
- DATABASE_USER=[REDACTED]
- DATABASE_PASS=[REDACTED]
- DATABASE_NAME=teslamate
- DATABASE_HOST=database
- MQTT_HOST=mosquitto
ports:
- "127.0.0.1:4001:4000"
volumes:
- ./import:/opt/app/import
cap_drop:
- all
database:
image: postgres:15
restart: always
environment:
- POSTGRES_USER=[REDACTED]
- POSTGRES_PASSWORD=[REDACTED]
- POSTGRES_DB=teslamate
volumes:
- teslamate-db:/var/lib/postgresql/data
grafana:
image: teslamate/grafana:latest
restart: always
environment:
- DATABASE_USER=[REDACTED]
- DATABASE_PASS=[REDACTED]
- DATABASE_NAME=teslamate
- DATABASE_HOST=database
ports:
- 3000:3000
volumes:
- teslamate-grafana-data:/var/lib/grafana
mosquitto:
image: eclipse-mosquitto:2
restart: always
command: mosquitto -c /mosquitto-no-auth.conf
# ports:
# - 1883:1883
volumes:
- mosquitto-conf:/mosquitto/config
- mosquitto-data:/mosquitto/data
volumes:
teslamate-db:
teslamate-grafana-data:
mosquitto-conf:
mosquitto-data: |
Can you verify what /source needs to be? And should I be listing a source for each docker-compose stack and container? I have volumes in a few places ex:
rename done:
debug output:
|
Yeah it would be helpful if you could list out a few of your compose files. I am mostly looking to see how you mount your volumes to each of your apps. Currently, Nautical doesnt really support native docker files--it's really been designed for So lets take a look at 2 of your configs and how we can update them. database:
image: postgres:15
container_name: postgresql. # Added Name
restart: always
environment:
- POSTGRES_USER=[REDACTED]
- POSTGRES_PASSWORD=[REDACTED]
- POSTGRES_DB=teslamate
volumes:
# - teslamate-db:/var/lib/postgresql/data #OLD
- /home/machine/docker_volumes/postgresql:var/lib/postgresql/data #NEW
grafana:
image: teslamate/grafana:latest
container_name: grafane # Added name
restart: always
environment:
- DATABASE_USER=[REDACTED]
- DATABASE_PASS=[REDACTED]
- DATABASE_NAME=teslamate
- DATABASE_HOST=database
ports:
- 3000:3000
volumes:
# - teslamate-grafana-data:/var/lib/grafana # OLD
- /home/machine/docker_volumes/grafana:/var/lib/grafana # NEW
services:
nautical-backup:
image: minituff/nautical-backup:latest
container_name: nautical-backup
volumes:
- /var/run/docker.sock:/var/run/docker.sock # Required for Docker interaction
# - /data/compose/:/app/source:ro # Mount all Docker volumes as the source (OLD)
- /home/machine/docker_volumes/app/source:ro # Mount all Docker volumes as the source (NEW)
- /home/machine/nautical-backups/config:/config # Configuration directory
- /home/machine/nautical-backups/destination:/app/destination # Backup destination
environment:
# Anything here The goal is that the /app/souce:
- grafana/
- postgresql/
- other containers ..... These paths would match the container names so nautical knows how to associate the containers. I am working on Nautical version 3, which would actually read the Compose files and even look inside the |
I get the following in my log file:
My compose file is:
and all that is in my backup directory after running is my log file. The ntfy.sh is just a script pushing the output to ntfy.
The text was updated successfully, but these errors were encountered: