How to restore backup?

How do I restore the backup from one instance of ERPnext to another instance?

Both are local ubuntu servers.

ERPNext: v12.0.6 (version-12)
Frappe Framework: v12.0.6 (version-12)

bench restore --with-public-files {public_tar_file} --with-private-files {private_tar_file} {database_gzip_file}

Could you explain the steps? I am a beginner with no programming background.

I’ve just given you the steps.

But just in case, this should be your first port of call

Extract your zip file, .sql file will get created. Save this file in your frappe-bench folder.
Then do this:
Open your terminal
Go to your current site folder and run
Cat site_config.json
You can see your site username and password there.
Then go to frappe-bench folder and run.
mysql -u your site_username -pyour site_password your site_username < your .sql file name

You can also go with this simplest way:

Just use two commands

1.bench mariadb
2. source path_of_.sql file


(v12) anadf@anadf:~/workspace/v12/frappe-bench$ **bench mariadb**
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 9038
Server version: 10.2.24-MariaDB-10.2.24+maria~xenial-log binary distribution

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [_6249cd9d78a008db]> **source /home/anadf/pathOfSQLFile/file.sql**

These recommended processes seem kinda too complicated in my opinion.

Simplest method i know is get your backup file to a directory in your system and go to frappe-bench folder and run this command;

frappe-bench$sudo bench --site [site_name] --force restore /[path_to_file]/database_name.sql

This command automatically queries the database of the site and if the database requires password you will be asked to enter it.

and then:

frappe-bench$sudo bench migrate

This command migrates your old site config setup to your new site.