-
-
Notifications
You must be signed in to change notification settings - Fork 792
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: More Backup Restore Fixes #2859
fix: More Backup Restore Fixes #2859
Conversation
Looking into this a little bit more it seems there's still an issue to look into. Will try to find time tomorrow |
How can I pull your branch if I'm deploying using Docker? I guess I just need manually update the files in the image? I was planning to try the restore with your branch, then export again, and attempt to import into RC2. |
That would work, however I'd advise against it since the fix doesn't seem to be fully working. I'd recommend restoring to the version you created your backup from in the meantime. |
I still have that instance. I guess I'll just stay on that old beta until you tell me the fixes are released, and then I'll try to switch to the new instance again. Thank you! |
08264f7
to
7bae100
Compare
c94e7f4
to
f83476d
Compare
data[key] = AlchemyExporter.DateTimeParser(time=value).time | ||
if self.is_uuid(value): | ||
# convert the data to the current database's native GUID type | ||
data[key] = GUID.convert_value_to_guid(value, self.engine.dialect) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the line that fixes this nightmare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
???? How did you figure this out?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pain
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The actual answer though: I stared at a lot of compiled queries and eventually noticed that all of my GUIDs were lowercase and had no dashes. Then I peeked into my backup data and noticed all of my GUIDs had dashes. Then I threw a hail-mary and bypassed our GUID implementation (see: 5cf5abe) and my restores started working
Looking closer at the GUID implementation, we keep the dashes in postgres (i.e. we keep the literal GUID representation as a string) and we convert the GUIDs to 32 char hex in sqlite. So sqlite GUIDs, in our implementation, are assumed to have no dashes. But our backup restore doesn't strip them out if they originally came from postgres
I'm very excited for this to be released! How will I know which release version this patch makes it into? |
It would've already been deployed under the nightly tag. |
Thanks! That's helpful, but since I'm using a packaged version from TrueCharts I won't get the nightly builds. I assume this patch will it make it into RC3 or any later releases? Thanks again! |
Correct, it'll be in whatever the next formal release is. That should be either rc3 or simply v1.0 |
I am now on 1.1.0, but I cannot upload my backup file. When I select the file, nothing ever happens in the UI to show progress of the file uploading, and even after waiting several minutes it does not appear. |
That might be a restriction on your webserver, the default often limits the file size |
I didn't have the problem with the earlier versions of Mealie with the same database backup. It's 110 MB. I'm also using the TrueCharts app on TrueNAS so I don't really have much control if what's going on in the container. I might be able to configure it to use an external data store, and then I could try manually copying the database backup into the right location. I'll give that a try tomorrow if I get a chance. |
Yup that was going to be my next suggestion. If you're able to access the mounted filesystem you can add it directly to the backups folder |
Switching to external data storage and moving my backup in myself was successful. The restore worked and I'm back in business! |
Yay! Glad to hear! |
What type of PR is this?
(REQUIRED)
What this PR does / why we need it:
(REQUIRED)
This fixes more backup-restore-related issues by replacing some of the Alembic ORM stuff with raw SQL.
Which issue(s) this PR fixes:
(REQUIRED)
Fixes #2857
Special notes for your reviewer:
(fill-in or delete this section)
This (and other similar issues) seems to only be an issue when folks are restoring from an older versions (i.e. they make a backup, upgrade, then restore). When restoring on the same version as the backup it seems to be fine.
Testing
(fill-in or delete this section)
Ran my ever-growing test suite of backups and they all restored successfully.