Restore failed ERPNext 15

Hi there,

I’m trying to upgrade from v13 to v15. Therefore I set up a new, dedicated VM that should hold the new release. I installed plain frappe / erpnext / hrms as statet in this blog article: [Guide] How to install ERPNext v15 on Linux Ubuntu (step-by-step instructions). I have a working ERPNext installation and created one site where I’m able to login. I completed the installation wizard as well.

Now I want to restore a backup from my v13. I tried it with the following command:
frappe@erpnext-vm:~/frappe-bench$ bench --site site1.local restore --with-public-files sites/site1.local/private/backups/20240329_000058-site1_local-files.tar --with-private-files sites/site1.local/private/backups/20240329_000058-site1_local-private-files.tar sites/site1.local/private/backups/20240329_000058-site1_local-b --force

But this leads to an error I cant understand and I don’t know, what to do in this case:

Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 114, in <module>
    main()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 20, in main
    click.Group(commands=commands)(prog_name="bench")
  File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/click/decorators.py", line 33, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/commands/__init__.py", line 29, in _func
    ret = f(frappe._dict(ctx.obj), *args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/commands/site.py", line 134, in restore
    _restore(
  File "/home/frappe/frappe-bench/apps/frappe/frappe/commands/site.py", line 166, in _restore
    err, out = frappe.utils.execute_in_shell(f"file {sql_file_path}", check_exit_code=True)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/__init__.py", line 484, in execute_in_shell
    raise Exception("Command failed")
Exception: Command failed

I use the following versions:
bench v5.22.3
ERPNext: v15.18.3 (version-15)
Frappe Framework: v15.19.1 (version-15)
Frappe HR: v15.15.0 (version-15)

Can anyone help with this issue?

Cheers,
–thpa

command can’t find the path.

Gnarf - the command “file” was not installed on server.

Needed to install via apt

sudo apt install file

Thanks anyway :slight_smile:

2 Likes