-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Docker compose update erased the database #5549
Comments
@brunoamaral, To ensure data is stored persistently in Docker, you need to map a folder in the docker-compose.yml file. Replace Example Configuration: volumes:
- /your/storage/location/uptime-kuma:/app/data This setup ensures that data within the container is preserved across restarts and upgrades. |
@homelab-alpha that is already a part of my docker-compose.yaml:
And still the data didn't persist for some reason. |
@brunoamaral, There is a difference between: volumes:
- ./data:/app/data and: volumes:
- /your/storage/location/uptime-kuma:/app/data With your approach (./data:/app/data), the compose file needs to be located in the same folder structure as the specified directory (./data). This makes it dependent on the location of the compose file. With my suggestion (/your/storage/location/uptime-kuma:/app/data), this dependency is eliminated, and the chance of making a mistake is significantly smaller. You can explicitly define the storage location independently of the compose file. EDIT: By default, Uptime Kuma uses Below are the commands to search for the kuma.db file across different operating systems: Ubuntu / Debian / RHEL / Fedora (Linux) find / -name kuma.db Windows (PowerShell) Get-ChildItem -Recurse -Filter kuma.db -Path C:\ macOS sudo find / -name kuma.db On Linux and macOS, the find command is used to search starting from the root (/). On Windows, the Get-ChildItem command in PowerShell is the appropriate option. As long as the database hasn’t been permanently deleted, you can locate the Uptime Kuma Database. |
🛡️ Security Policy
📝 Describe your problem
Maybe this was a miss step on my part.
docker-compose.yaml
Then when updating with
docker compose pull
,docker compose up -d
the container was recreated and the database left blank.📝 Error Message(s) or Log
No response
🐻 Uptime-Kuma Version
1.23.16
💻 Operating System and Arch
Ubuntu 22.04.5
🌐 Browser
Any
🖥️ Deployment Environment
The text was updated successfully, but these errors were encountered: