mirror of
https://github.com/healthchecks/healthchecks.git
synced 2026-04-26 07:25:51 +03:00
[GH-ISSUE #834] Export and import support #587
Labels
No labels
bug
bug
bug
feature
good-first-issue
new integration
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/healthchecks#587
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @pfsmorigo on GitHub (May 30, 2023).
Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/834
I have a self hosted healthchecks instance and I had to change my VPS last month. I exported all the database and tried to import back but it's not being easy. Maybe if there is a option to export and import in some known format like json or yaml.
Is there something like that in the roadmap for this project? If not, maybe I can give a shot.
@cuu508 commented on GitHub (May 30, 2023):
What issues did you run into?
Export/Import has been requested a few times, and I agree would be useful:
For moving data between self-hosted instances, it could be as simple as a couple management commands – one command to produce a database dump, and another for importing it.
Export/import through web UI would be more tricky:
It would have to be done very carefully, as there's lots of potential for unintended side-effects and security oopsies.
There was one time when a customer deleted a big project by accident and asked if it's possible to restore it. Obviously I could not restore the whole database, as it would roll back data for all other users. I restored a database backup to a separate system, and wrote export/import commands to export/import a single account. Here are the commands I used:
export.py:
restore.py:
Note: I have not checked what happens with Postgres sequences if you use the above scripts to import data in an empty database.