This tutorial is a follow-up of the tutorial Setup of Uptime Kuma Standalone on Ubuntu with a Reverse Proxy.
This tutorial describes how to back up your Uptime Kuma instance and restore it, if needed.
The time required for this tutorial is about 3-5 minutes.
You need a running Uptime Kuma instance that does not use the Docker setup.
sudo -s
to get root permissions.Enter
.zip
(along with unzip
) with apt install -y zip unzip
.Enter
once to continue.systemctl stop uptime-kuma
.exit
to leave the root shell.zip -r uptimekuma-backup.zip ./uptime-kuma/data
to create a backup of your Uptime Kuma data.sudo systemctl start uptime-kuma
.exit
to leave the SSH session.Now you have a backup of your Uptime Kuma data in the file uptimekuma-backup.zip
in the home directory of the user you used to log in to your server.
Warning: If you carry out the steps below, your current Uptime Kuma data will be overwritten!
For using this tutorial the backup file needs to be stored in the user's home directory. If it is not there, you can upload it with scp
or sftp
to your server.
If it is just the database that is broken, you can restore it easily.
If the entire Uptime Kuma instance is broken, you need to delete the current instance first and then restore the backup. For this purpose, you must delete the current instance using the command rm -r uptime-kuma
and then reinstall it by following Step 4 of the installation tutorial.
sudo systemctl stop uptime-kuma
to get root permissions.Enter
.rm -r uptime-kuma/data
to delete the current Uptime Kuma data.mv uptimekuma-backup.zip uptime-kuma && cd uptime-kuma
.unzip uptimekuma-backup.zip
to restore the backup.sudo systemctl start uptime-kuma
to start the Uptime Kuma service.Now you know how to back up and restore your Uptime Kuma instance.
Thank you for reading this tutorial.
Copyright (c) 2023 Konstantin Protzen
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
By making a contribution to this project, I certify that:
The contribution was created in whole or in part by me and I have the right to submit it under the license indicated in the file; or
The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same license (unless I am permitted to submit under a different license), as indicated in the file; or
The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it.
I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the license(s) involved.