Moving bench/frappe-bench local folders

Hi guys,

I 've been fine using bench start to start Development Server. But recently I have had to move both bench and frappe-bench folders. So bench wasn’t recognised and I reinstalled it, it’s all fine.

But now bench start will fail because it still reference the old frappe-bench path. So how can I reconnect this new bench to the new path of frappe-bench ?

Thank you!

mv env envb
bench setup env
bench update --requirements

At the risk of sounding dim, could you elaborate on that?

Do I just move the folders and then run the second two commands on those folders?

Is there any way to move the entire bench from one volume or mount point to another?

Thanks @pdvyas this worked for me

mv old-bench new-bench
cd new-bench
bench setup env (run 2 times)
bench update --requirements
sudo bench setup production OS-USERNAME

bench creates a virtual environment inside the bench directory.

For example, if you run bench init demo. A virtual environment will be created at ./demo/env.

Moving this env is not guaranteed to work. There are a number of problems that could arise due to this as the existing path is hardcoded in multiple files in the ./demo/env.

A better alternative is to recreate a fresh environment instead.

Another alternative is to use cpvirtualenv and create a new virtual environment from the existing one.