Error during replicating a site in Frappe cloud to local setup

Hi all,

I am trying to replicate a site in frappe cloud from a private bench to my local bench setup

Steps I followed so far:

  1. downloaded all files public, private, config, and db from Fcloud
    Ran:
  2. bench --site restore /path/to/your-backup.sql.gz
  3. Ran the below
    tar -xvf /path/to/files.tar -C ~/frappe-bench/sites//private/files
    tar -xvf /path/to/public.tar -C ~/frappe-bench/sites//public/files
  4. replaced values from downloaded site_config.json to the one which is in the installed dir
  5. installed all the apps

ERROR which I get on hitting the site

Watching for changes…
19:10:11 web.1 | 127.0.0.1 - - [09/Dec/2024 19:10:11] “GET / HTTP/1.1” 500 -
.
.
.

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
19:10:11 web.1         |   File "/Users/<path>/env/lib/python3.12/site-packages/pymysql/connections.py", line 775, in _read_packet
19:10:11 web.1         |     packet.raise_for_error()
19:10:11 web.1         |   File "/Users/<path>/env/lib/python3.12/site-packages/pymysql/protocol.py", line 219, in raise_for_error
19:10:11 web.1         |     err.raise_mysql_exception(self._data)
19:10:11 web.1         |   File "/Users/<path>/env/lib/python3.12/site-packages/pymysql/err.py", line 150, in raise_mysql_exception
19:10:11 web.1         |     raise errorclass(errno, errval)
19:10:11 web.1         | pymysql.err.OperationalError: (1054, "Unknown column 'date_format' in 'field list'")

Kindly help me with this or if there is any better approach to test a site locally.

Thanks in advance.

make sure you have all apps installed in your local same as Frappe Cloud, with the same version. You can use --force to restore database

bench --site <your-site-name> --force restore /path/to/your-backup.sql.gz

then,

bench --site <your-site-name> migrate

1 Like