Backup and restore without GUI #805

Closed
opened 2026-02-28 01:59:43 -05:00 by deekerman · 20 comments
Owner

Originally created by @mabed-fr on GitHub (Feb 4, 2022).

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

  • I checked and didn't find similar issue

🛡️ 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

Originally created by @mabed-fr on GitHub (Feb 4, 2022). ### ⚠️ 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](https://github.com/louislam/uptime-kuma/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
deekerman 2026-02-28 01:59:43 -05:00
  • closed this issue
  • added the
    Stale
    help
    labels
Author
Owner

@AlexanderSalge commented on GitHub (Feb 25, 2022):

would like to see this option

@AlexanderSalge commented on GitHub (Feb 25, 2022): would like to see this option
Author
Owner

@PixelJonas commented on GitHub (Apr 12, 2022):

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

@PixelJonas commented on GitHub (Apr 12, 2022): 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
Author
Owner

@jamolnng commented on GitHub (Jun 6, 2022):

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"}'
@jamolnng commented on GitHub (Jun 6, 2022): 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 ```bash curl -X POST https://status.domain -H 'Content-Type: application/json' -d '{"login":"my_login","key":"api_key"}' ```
Author
Owner

@c0nfus3d commented on GitHub (Jul 19, 2022):

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.

@c0nfus3d commented on GitHub (Jul 19, 2022): 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.
Author
Owner

@github-actions[bot] commented on GitHub (Oct 17, 2022):

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.

@github-actions[bot] commented on GitHub (Oct 17, 2022): 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.
Author
Owner

@pascaliske commented on GitHub (Oct 17, 2022):

This issue is still relevant in my opinion...

@pascaliske commented on GitHub (Oct 17, 2022): This issue is still relevant in my opinion...
Author
Owner

@mabed-fr commented on GitHub (Oct 17, 2022):

No i want this feature

@mabed-fr commented on GitHub (Oct 17, 2022): No i want this feature
Author
Owner

@PixelJonas commented on GitHub (Oct 17, 2022):

+1 for /remove-stale having being able to have automatic backup would be a game changer

@PixelJonas commented on GitHub (Oct 17, 2022): +1 for /remove-stale having being able to have automatic backup would be a game changer
Author
Owner

@github-actions[bot] commented on GitHub (Jan 16, 2023):

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.

@github-actions[bot] commented on GitHub (Jan 16, 2023): 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.
Author
Owner

@mabed-fr commented on GitHub (Jan 16, 2023):

I wait this feature with the API

@mabed-fr commented on GitHub (Jan 16, 2023): I wait this feature with the API
Author
Owner

@boc-the-git commented on GitHub (Jan 16, 2023):

Also think this is an important feature.

@boc-the-git commented on GitHub (Jan 16, 2023): Also think this is an important feature.
Author
Owner

@Mario-Hofstaetter commented on GitHub (Feb 13, 2023):

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?

@Mario-Hofstaetter commented on GitHub (Feb 13, 2023): 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?
Author
Owner

@chakflying commented on GitHub (Feb 13, 2023):

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.

@chakflying commented on GitHub (Feb 13, 2023): 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.
Author
Owner

@thomas-mc-work commented on GitHub (Feb 13, 2023):

You can use this command safely while the service is running:

sqlite3 data/kuma.db ".backup '/backups/kuma.db'"
@thomas-mc-work commented on GitHub (Feb 13, 2023): You can use this command safely while the service is running: sqlite3 data/kuma.db ".backup '/backups/kuma.db'"
Author
Owner

@github-actions[bot] commented on GitHub (May 14, 2023):

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.

@github-actions[bot] commented on GitHub (May 14, 2023): 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.
Author
Owner

@github-actions[bot] commented on GitHub (May 16, 2023):

This issue was closed because it has been stalled for 2 days with no activity.

@github-actions[bot] commented on GitHub (May 16, 2023): This issue was closed because it has been stalled for 2 days with no activity.
Author
Owner

@baharalidurrani commented on GitHub (Sep 28, 2023):

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 pi@raspberrypi.local:~/backups/kuma-data.tar.gz ~/tools/backups

Replace pi with the user and raspberrypi.local with the IP of the host machine respectively.

@baharalidurrani commented on GitHub (Sep 28, 2023): 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: ```sh 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: ```sh scp pi@raspberrypi.local:~/backups/kuma-data.tar.gz ~/tools/backups ``` Replace `pi` with the user and `raspberrypi.local` with the IP of the host machine respectively.
Author
Owner
@huyz commented on GitHub (Jul 20, 2024): See https://github.com/louislam/uptime-kuma/issues/4872#issuecomment-2182798632
Author
Owner

@steliospavlidis commented on GitHub (Jan 13, 2026):

We need this

@steliospavlidis commented on GitHub (Jan 13, 2026): We need this
Author
Owner

@CommanderStorm commented on GitHub (Jan 13, 2026):

Please refer to https://github.com/louislam/uptime-kuma/issues/4872#issuecomment-2182798632 instead of this duplicate issue.

There are better issues to track this in than a help-ticket from 2022.

@CommanderStorm commented on GitHub (Jan 13, 2026): Please refer to https://github.com/louislam/uptime-kuma/issues/4872#issuecomment-2182798632 instead of this duplicate issue. There are better issues to track this in than a help-ticket from 2022.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/uptime-kuma#805
No description provided.