uptime-kuma
uptime-kuma copied to clipboard
Backup and restore without GUI
⚠️ Please verify that this bug has NOT been raised before.
- [X] I checked and didn't find similar issue
🛡️ Security Policy
- [X] I agree to have read this project Security Policy
📝 Describe your problem
Backup and restore without GUI
Hello, I would like to create a task to backup my main uptime Kuma without the GUI and restore it in another instance, all in CLI if possible.(for sync the probe)
Is this possible?
Regards
🐻 Uptime-Kuma Version
Version: 1.11.3
💻 Operating System and Arch
Debian 11
🌐 Browser
Version 96.0.4664.110 (Build officiel) (64 bits)
🐋 Docker Version
Docker version 20.10.12, build e91ed57
🟩 NodeJS Version
docker image
would like to see this option
adding a +1 on that. I think as a first implementation, having an API Endpoint to get a backup would suffice being able to save that configuration
Also would like to see this. Maybe a menu where you can generate and remove API tokens so only valid tokens can get the data. Then you could execute something like a curl command for something like automatic backups
curl -X POST https://status.domain
-H 'Content-Type: application/json'
-d '{"login":"my_login","key":"api_key"}'
We have two uptime kuma servers. One is basically just a backup server at an offsite location. The ability to manage our main server and have a cronjob automate the notification and monitor syncing to the backup server would be extremely useful.
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.
This issue is still relevant in my opinion...
No i want this feature
+1 for /remove-stale having being able to have automatic backup would be a game changer
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.
I wait this feature with the API
Also think this is an important feature.
After more than a year came back to see if automated / scripted config import is available, sadly not it seems? 😢
Am I currectly understanding that its not possible to load a config backup at startup (preferably docker container)?
Would not need a fully fledged rest api with tokens and whatnot, a file mounted to the container would suffice for us.
This keeps us from using uptime-kuma since it has to be deployable as easy as possible, from a git version-controlled committed default configuration (complete monitoring stack prometheus, grafana, loki, ........). Having users at the customer site manually import some config is tedious and error prone.
Has anybody hacked something together to support this?
All the application data is currently stored in an SQLite file, which can be mounted as docker volume as per setup instructions. If you have no security requirements you can just setup once then copy the database on deployment.
You can use this command safely while the service is running:
sqlite3 data/kuma.db ".backup '/backups/kuma.db'"
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.
This issue was closed because it has been stalled for 2 days with no activity.
I was able to extract a compressed data
folder from the uptime-kuma
local repo using scp
Secure Copy Protocol.
First cd into the uptime-kima directory.
Then compress the data
folder using:
tar -zcvf ~/backups/kuma-data.tar.gz data/
This will compress everything in the data folder and save as kuma-data.tar.gz
in ~/backup/
If you want to copy it onto a remote machine use the scp
command from the remote machine.
Make sure that the uptime-kuma host machine have SSH
enabled:
scp [email protected]:~/backups/kuma-data.tar.gz ~/tools/backups
Replace pi
with the user and raspberrypi.local
with the IP of the host machine respectively.