Closed yashwanth-t3 closed 4 months ago
check line 3 of your sql file and remove the escape character '\'
Imported the backup database data by running the following command inside the backend-container
mysql -u root -p -h
For importing the public and private file, Extract the file and place the files inside the site public and private files respectively.
Downgrade to mariadb 10.3
Reference to Revant's forum entry
I also managed to get past the issue by uppdating frappe
Description of the issue
I want to restore the backup database but it is giving me error and also deletes already existing tables ( like frappe doctypes) @revant Can you please help me with this issue?
Context information (for bug reports)
I have my backup in s3 bucket and have downloaded it to the instance where I'm running my frappe docker. I want to restore this backup data to the application running inside the docker. I have to used the following commands to restore inside docker container
bench --site localhost restore /home/frappe/frappe-bench/20240710_000018-app_turiyaforms_in-database.sql
orbench restore /home/frappe/frappe-bench/20240710_000018-app_turiyaforms_in-database.sql
Even I have tried this with --force option which is not helping me.I have one site create with the same app installed in the site in the frappe docker. Now, I just want to move my production data inside the docker using the backup. Before doing the restore I have checked the mariadb manually it have all the frappe doctypes (including 'tabDefaultValue') in the database. After I use the restore command it is giving me the error (mentioned below) and deleted all the tables from the database.
bench restore /home/frappe/frappe-bench/20240710_000018-app_turiyaforms_in-database.sql MySQL root password: ERROR at line 3: Unknown command '\-'. Table 'tabDefaultValue' missing in the restored site. Database not installed correctly, this can due to lack of permission, or that the database name exists. Check your mysql root password, validity of the backup file or use --force to reinstall
The mariadb image used is mariadb:10.6
I have tried the solution like (https://discuss.frappe.io/t/table-tabdefaultvalue-missing-error-when-creating-new-site/78019/17)
[mysqld] innodb_read_only_compressed = FALSE
Still facing the same issue. Can't restore the old backup data.
Steps to reproduce the issue
bench --site {site} backup --with-files
bench restore [OPTIONS] SQL_FILE_PATH
Observed result
After the restore command the database tables are deleted. Even the default frappe doctype is deleted.
Expected result
Want to restore the backup data and use in the site running in docker.
Stacktrace / full error message if available