New site is asking for backup even it is first time

If I try to run for first time bench new-site fdpconnect.com then it throws following error

  File "/Users/macbook/code/Frappe/frappe-fdp/apps/frappe/frappe/commands/site.py", line 75, in new_site
    _new_site(
  File "/Users/macbook/code/Frappe/frappe-fdp/apps/frappe/frappe/installer.py", line 89, in _new_site
    install_db(
  File "/Users/macbook/code/Frappe/frappe-fdp/apps/frappe/frappe/installer.py", line 171, in install_db
    bootstrap_database(
  File "/Users/macbook/code/Frappe/frappe-fdp/apps/frappe/frappe/database/__init__.py", line 36, in bootstrap_database
    return frappe.database.mariadb.setup_db.bootstrap_database(verbose, source_sql)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/macbook/code/Frappe/frappe-fdp/apps/frappe/frappe/database/mariadb/setup_db.py", line 78, in bootstrap_database
    import_db_from_sql(source_sql, verbose)
  File "/Users/macbook/code/Frappe/frappe-fdp/apps/frappe/frappe/database/mariadb/setup_db.py", line 101, in import_db_from_sql
    DbManager(frappe.local.db).restore_database(
  File "/Users/macbook/code/Frappe/frappe-fdp/apps/frappe/frappe/database/db_manager.py", line 80, in restore_database
    frappe.throw(
  File "/Users/macbook/code/Frappe/frappe-fdp/apps/frappe/frappe/__init__.py", line 675, in throw
    msgprint(
  File "/Users/macbook/code/Frappe/frappe-fdp/apps/frappe/frappe/__init__.py", line 640, in msgprint
    _raise_exception()
  File "/Users/macbook/code/Frappe/frappe-fdp/apps/frappe/frappe/__init__.py", line 591, in _raise_exception
    raise exc
frappe.exceptions.ExecutableNotFound: mariadb not found in PATH! This is required to restore the database.

you got any solution?

Can you kindly share on how you overcame this error?

Install MariaDB before trying to create a site, it’ll work as expected.

1 Like

In my case, the problem was that following the step-by-step tutorial for Mac, when you install MariaDB using brew install mariadb@10.6, it works, but to call MariaDB you have to use mariadb@10.6 instead of mariadb, which isn’t reflected in Frappe’s configuration.

I solved it by installing MariaDB without specifying the version using brew install mariadb, and then everything in Frappe worked correctly. However, you need to delete your project and start again from the bench init.