-
-
Notifications
You must be signed in to change notification settings - Fork 798
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
Issue in restoring the backed data via invoke restore
#8605
Comments
invoke restore
invoke restore
You will need a few more things:
For a restore you will need to initialise the database before attempting the restore. |
To be specific here, you need to run The errors here are because the required database tables have not been initialized yet. Ref: https://docs.inventree.org/en/stable/start/migrate/#initialize-new-database |
Still issue is there with different error. Server is up But unable to login with old username and password Different error while restoring the data(Refer below the Error logs). Update the Restore process
Error log
Running Database server log output
|
Are you migrating data between two setups with the exact same version and configuration? The error message here is likely because multi site support is not enabled on your new setup - but it was (at some stage) on your old setup. So, there are tables which exist in your old database which are not available in your new setup.. |
Yes, Migrated between the setup. Both running the inventree version. Still issue is there with different error while database restore. Server is up But unable to login with old username and password Different error while restoring the data(Refer below the Error logs). List of changes made here:
Brief about existing working systemThis configuration done 1.5 years before, application is running on portainer via stacks. List of modified done in 'yaml' file.
My understanding
The error relation "public.socialaccount_socialapp_sites" does not exist confirms that the database restore is attempting to reference a table that does not exist in the current database In document check here socialaccount. In existing system I haven't create any social account. So I tried the fix, but it is not working. Log outputFrom
|
So, what you probably need to do is:
|
Actually, I don't know much about database table creation. Two options coming in my mind
Please let me know If the manual table creation is the only option to do? Other question, How to ensure that current running inventree application on Portainer's Stacks doesn't any error in database side backend? As of system working while accessing from frontend GUI. |
Please provide your response here. All My important data is stored here. |
I am not suggesting creating any new tables. Rather, in the old data, you need to remove the offending table - as it is not supported in the new database schema |
Yes, I understand your point. I haven't worked in the database. Still I started exploring. As per online search and chatgpt, I tried the take dump from the backup database file and removed the problem line then tried restoring data. But that is giving many errors 😕. This is the reason I am asking for a possible alternate approach. Your help will be very much valuable here!!! CC: @SchrodingersGat |
Unless you can get the database schema to match between both systems, the the
Yes, this would be worth a try. The data import process is more forgiving around differences in database tables. I have successfully used this to migrate between different database backends. What error message are you getting when you try this approach? |
While import first I got below error
After see this error tried adding the below line in config as per the previous system( I configured default currency as INR).
and then run I tried copy whole
I have attached both the logs Not Sure what is mistake I am doing here. Complete Error logs for two case
|
Please let me know if I have to provide any other details |
All the issues are resolved, by adding
Thanks for your support !!!! |
@Jaishankar872 happy to hear that you got it worked out |
Please verify that this bug has NOT been raised before.
Describe the bug*
I want to have a proper backup and restore plan for Inventree database and media. Using the invoke created the backup manually for database and media. But restore of this same data in not working at all. Tried all the combination.
Steps to Reproduce
Creating backup in the existing running system
invoke backup
.env file
Restore the data backup in other new system
.env file
invoke restore
(Giving error)OR Tried Individually also (Giving error)
Note: I tried without applying the
invoke install
orinvoke update --skip-backup
step, still issue is there.Expected behaviour
Success database and media file restore. In database restore is failed. For details refer the log section.
Deployment Method
Version Information
Versions:
Python 3.11.9
Django 4.2.15
InvenTree 0.16.9
API 232
Node N/A
Yarn N/A
Commit hash: e0756a7
Commit date: 2024-11-30
Please verify if you can reproduce this bug on the demo site.
Relevant log output
The text was updated successfully, but these errors were encountered: