Installing multiple erpnext in multiple bench setup

I have created two bench using command

bench init frappe-bench
bench init frappe-bench-develop

Erpnext already installed in frappe-bench and working fine
when i tried to install another erpnext inside frappe-bench-develop it shows error on bench get-app erpnext https://github.com/frappe/erpnext command

INFO:bench.app:getting app erpnext
fatal: destination path ‘erpnext’ already exists and is not an empty directory.

how to solve this.

Why are you trying to create two benches?

If you want more than one site, use new-site.

Trying to create bench for development and master,please let me know if it is possible.

Yes it is!

Bench is designed to have multiple instances. To start a new bench, just do bench init

Easiest would be to copy bench init --clone-from old-bench

See

bench init --help

for more info.

1 Like

I created two bench,

  1. frappe-bench -default bench
    2 .frappe-bench-develop -newly created

but how to use newly created bench ‘frappe-bench-develop’.is there any command to switch between benches,because all app directly installed in first bench ‘frappe-bench’ and all command working with default bench.no effect in new bench

same problem here bench initiation done in different folder but when running bench get-app appname it is try install only in old bench if it already in there it is showing error I cant able to install app in new bench

You have to run the command from the base folder of the bench

base folder means?.. I have bench-repo, frappe-bench (active) ,frappe(new)

my commands

vhrs@vhrs-HP-Z210-Workstation:~$ cd Desktop/frappe/
vhrs@vhrs-HP-Z210-Workstation:~/Desktop/frappe$ bench get-app erpnext https://github.com/frappe/erpnext
INFO:bench.app:getting app erpnext
fatal: destination path 'erpnext' already exists and is not an empty directory.
Traceback (most recent call last):
  File "/usr/local/bin/bench", line 9, in <module>
    load_entry_point('bench==2.1.0', 'console_scripts', 'bench')()
  File "/home/vhrs/bench-repo/bench/cli.py", line 40, in cli
    bench_command()
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/home/vhrs/bench-repo/bench/commands/make.py", line 30, in get_app
    get_app(git_url, branch=branch)
  File "/home/vhrs/bench-repo/bench/app.py", line 62, in get_app
    cwd=os.path.join(bench_path, 'apps'))
  File "/home/vhrs/bench-repo/bench/utils.py", line 130, in exec_cmd
    raise CommandFailedError(cmd)
bench.utils.CommandFailedError: git clone https://github.com/frappe/erpnext   --origin upstream

Hi all,

was this eventually resolved and how?

Many thanks

I renamed frappe-bench folder to something new name(frappe-bench can not use it again if renamed,)

then created multiple benches using bench init new-bench-name.

I don’t know whether it is the right way or not.it worked only after renaming frappe-bench folder for me

Thanks a lot @Hafees_Kazhunkil

@rmehta is there a fix for this in the works or is it just that we’re missing something?

Thanks plenty

Folder renaming works but when creating new site it creates in old bench only