self-hosted
self-hosted copied to clipboard
During the restore process, the "id" field is incremented
Self-Hosted Version
Sentry 23.12.1
CPU Architecture
x86_64
Docker Version
24.0.6
Docker Compose Version
2.12.2
Steps to Reproduce
In the restore process, the "id" field is incremented instead of following the "pk" field in the backup.json file.
Expected Result
To restore the ID field using the "pk" field during the project recovery.
Actual Result
The project ID increments directly from 1 during the restoration process.
Event ID
No response
By default, this is the intended effect, since restore needs to work on an already-used database (ex: what if you are restoring into a DB that already has pk 12
?). How difficult is it to alter DSNs manually post-restore?
By default, this is the intended effect, since restore needs to work on an already-used database (ex: what if you are restoring into a DB that already has pk
12
?). How difficult is it to alter DSNs manually post-restore?
Yes, but the situation now is that after I restored, all the project_id have changed. In that case, I need to republish all my projects. I feel that the cost of restore is a bit high in this way. My database is empty. Perhaps the restore script could support the selection of whether the database is empty or not, instead of directly avoiding conflict issues.
I solved this problem by adjusting the backup.json and using placeholders to replace the missing ids (which were deleted previously). Thank you for your timely response. What I'm doing now is migrating the Sentry server, and the restore method has helped me a lot. @azaslavsky
I'll think about possibly adding this feature, since it would be useful to not have to change DSNs after a restore. Thanks for the suggestion!
I'm going to be looking at this feature this week. Hopefully we'll have something out before 24.2.0 lands in mid-February. Thank you for the patience!
Well, it's definitely been more than a week, but the fix is in flight. This should be available on nightly and 24.5.0 once it is merged: https://github.com/getsentry/sentry/pull/67621.