Erpnext version 12 backup restore

bench --site dcode.com --force restore /home/virtual/frappe-benchv12/sites/dcode.com/20231107_104555-hiplerp_frappe_cloud-database.sql.gz
MySQL root password:
ERROR 2006 (HY000) at line 346: MySQL server has gone away
Database not installed, this can due to lack of permission, or that the database name exists.
Check your mysql root password, or use --force to reinstall How to restore version 12 backup successfully in version 12 bench

@Runway Unzip furst your sql file

gunzip /home/virtual/frappe-benchv12/sites/dcode.com/20231107_104555-hiplerp_frappe_cloud-database.sql.gz

then you will find unzipped file in same folder, use this to restore backup

Can you provide restore version 12 backup full commands in version12

@Runway it’s the same you are running,

always you need to unzip db file as it’s zipped, unzip it and excute same commond with unziped file name

bench restore for first i done unzip file and after i pass command bench --site site12.com --force restore 20231107_104555-hiplerp_frappe_cloud-database.sql that time come errror
MySQL root password:
ERROR 2006 (HY000) at line 346: MySQL server has gone away
Database not installed, this can due to lack of permission, or that the database name exists.
Check your mysql root password, or use --force to reinstall
And bench start in browser in also come errror related pymysql.err.ProgrammingError

pymysql.err.ProgrammingError: (1146, “Table ‘_2f591abbba5d14bd.tabPortal Menu Item’ doesn’t exist”) how to restore backup successfully backup version 12 and bench also version 12

I have erpnext 12.31.0
frappe 12.28.2 backup file, how should I restore it in erpnext 12.31.0
frappe 12.28.2?