Skip to content
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

Updating without losing data #3968

Closed
2 tasks done
aciducen1995 opened this issue Oct 31, 2023 · 6 comments
Closed
2 tasks done

Updating without losing data #3968

aciducen1995 opened this issue Oct 31, 2023 · 6 comments

Comments

@aciducen1995
Copy link

aciducen1995 commented Oct 31, 2023

⚠️ Please verify that this bug has NOT been raised before.

  • I checked and didn't find similar issue

🛡️ Security Policy

📝 Describe your problem

May i know what is the appropriate way to update uptime-kuma without losing any data? The steps i always do are as below but sometime its working sometimes its not working.

  • docker pull louislam/uptime-kuma:1
  • docker volume create uptime-kuma-v1.23.3
  • docker run -d --restart=always -p 3001:3001 -v uptime-kuma-v1.23.3:/app/data --name uptime-kuma-v1.23.3 louislam/uptime-kuma:1
  • Transfer all the database tables except heartbeat to this newly created container using Heidi SQL

FYI, i have 800+ monitoring with already have 9GB for kuma.db.

📝 Error Message(s) or Log

This is the error i get when i do docker logs --details containerID

at consoleCall ()
at Timeout.safeBeat [as _onTimeout] (/app/server/model/monitor.js:987:25)
2023-10-31T04:11:50+08:00 [MONITOR] ERROR: Please report to https://github.com/louislam/uptime-kuma/issues
2023-10-31T04:11:50+08:00 [MONITOR] INFO: Try to restart the monitor
Trace: [Error: select * from heartbeat where monitor_id = 614 ORDER BY time DESC limit 1 - SQLITE_CORRUPT: database disk image is malformed] {
errno: 11,
code: 'SQLITE_CORRUPT'
}

Sometimes it works maybe depending on the updated version. but for this latest v.1.23.3, I always failed to update. once transfer the db, uptime kuma reconnects every 1 minute

🐻 Uptime-Kuma Version

1.23.3

💻 Operating System and Arch

Oracle Linux 8.5

🌐 Browser

Google Chrome

🐋 Docker Version

20.10.17

🟩 NodeJS Version

No response

@louislam
Copy link
Owner

First thing first, make a backup of your old volume first.

You don't need to create a new volume. You can use the same volume all the time.

You should follow:
https://github.com/louislam/uptime-kuma/wiki/%F0%9F%86%99-How-to-Update

Transferring data using HeidiSQL is not recommended, because Uptime Kuma has its own database migration process.

@aciducen1995
Copy link
Author

Thank you for your time to reply. I have seen that wiki but never knew it has its own database migration. I assume it uninstall old container since its has "rm" command.

@CommanderStorm
Copy link
Collaborator

CommanderStorm commented Nov 1, 2023

See the diference between -v /foo and -v awesome:/bar in
https://docs.docker.com/engine/reference/run/#clean-up---rm

The local file system of the container indeed gets deleted and the container also gets deleted.
What does not get deleted though is the externally mounted volume, as it lives "outside" (not correct, but close enough) of docker

@aciducen1995
Copy link
Author

@louislam sorry if its out of context, is their a way to change uptime percentage in status page? as far as i know, the uptime is only 24h. any plan for this?

@CommanderStorm
Copy link
Collaborator

Inital requirements for such a feature were added by #2750
See issues like #2477 (and all the issues linked to it)

Here is our contribution guide: https://github.com/louislam/uptime-kuma/blob/b534fde26512bb4e6ae674aa92d5447c11e15b2c/CONTRIBUTING.md

Copy link

github-actions bot commented Feb 5, 2024

We are clearing up our old issues and your ticket has been open for 3 months with no activity. Remove stale label or comment or this will be closed in 2 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants