cd frappe-bench
bench restore --with-files
if you have an existing instance
-
login to mysql
mysql -u root -p -h localhost
-
identify the database name
SHOW DATABASES;
-
drop existing database
DROP DATABASE [db_name];
(this can take a while to finish) -
check the database is gone with
SHOW DATABASES;
-
log out from mysql
exit
-
restore from sql file with files
cd ~/frappe-bench
bench --site [site_name] restore --with-public-files [/path/to/file.tar] --with-private-files [/path/to/file.tar] [/path/to/file.sql]
(that as well may take a while. You'll also have to provide the MySQL root password
- test whether it work by
bench mariadb
if you are being logged in to the database, at least the restore seems to have worked