How to restore version 12 bench backup in version 12 of erpnext and frappe in ubuntu 18.04

I install ubuntu18.04 in frappe version 12.28.2 and erpnext version 12.31.0 successsfully now cloud in frappe version 12.28.2 and erpnext version 12.31.0 bench database backup now local device in restore cloud backup time come error like:
bench --site site12.com --force restore /home/virtual/Downloads/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 solve this error and how to cloud backup restore successfully

version 12 backup time clloud 12 backup in following screen shot according module is not come how to install it module in version 12