Swicthing from frappe-bench to bench

I’m still using the frappe-bench tool, but that is now deprecated. How do I safely move to the new bench tool without disrupting my existing installation?

I did not find docs in either bench repos.

Thanks!
-Jev

i didn’t look carefully enough the first time around. I found the docs that I need: Migrating from old bench · frappe/bench Wiki · GitHub :slight_smile:

Hi @ebjorsell, to satisfy my curiosity, how long ago was frappe-bench used? Will I have the “new” bench tool if I installed ERPNext after October 2014? (using the bench “Easy Way” setup_frappe.sh script). Thanks.

Hi @Dale_Scott,

I think you will be running the new bench tool.

To update it to the latest, i think the following will work:

    git clone https://github.com/frappe/bench bench-repo
    sudo pip install -e bench-repo```

If `~/bench-repo` already exists, do;
`cd ~/bench-repo && git pull && cd ~/ && sudo pip install -e bench-repo`

It would be really nice if bench had the following subcommands:
- bench version
- bench updateself 

Or, if bench was published on pypi, so we could use pip to manage installs and updates from there.

There is a bench config `bench config update_bench_on_update on` but that doesn't like to be run as the erpnext user. It gets file permission errors on my system.

Hey Jev and Dale,
Sorry for coming in late here. Gem of suggestions :smile:

Dale, the old system was just a shell script, the new tool is a python cli program and I am quite positive that you’re on the latest tool.

Jev,

In your installation, if I remember correctly, you’ve erpnextadmin and erpnext user. Right now bench permissions are not designed for this pattern. All the permissions it needs is to the bench-repo dir, so if you give erpnext the perms for that update_bench_on_update would work as intended.

Putting bench on PyPi isn’t much of an effort but I fear that users won’t update it often. That would also make it difficult to implement bench updateself for bench install that happen via sudo pip install bench as the bench commands would be run as frappe/erpnext user and not as sudo. The way it’s implemented right now is that the bench repository is cloned to bench-repo as frappe/erpnext user and it’s installed as an “editable” package. So, updating is just a git pull in bench-repo dir.

Long time ago, pip had the feature of user wise site packages and in that case we could put bench there but I think the feature is removed now.

1 Like