Skip to content

Migrating from old bench

Pratik Vyas edited this page Jul 23, 2014 · 11 revisions

The following steps will convert your existing old bench (assumed ~/frappe-bench) to the new bench.

  • Install pip

    If you're on CentOS, make sure that you've pip installed. If you installed Python 2.7 from IUS community's repository (or using the install_centos.sh script from previous bench), run

    yum install python27-setuptools
    easy_install-2.7 -U pip
    
  • Backup!

     cd ~
     cp -r frappe-bench frappe-bench-backup
    
  • Install new bench

     cd ~
     git clone https://github.com/frappe/bench bench-repo
     sudo pip install -e bench-repo
    
  • Remove unnecessary files

     cd ~/frappe-bench
     rm -rf install_scripts scripts templates standard_apps.json Readme.md .gitignore .git .update_bench
    
  • Remove old crontab entries, check if you have crontab entries from the previous bench by running crontab -l and remove them by editing the crontab using crontab -e.

  • Setup bench

     cd ~/frappe-bench
     bench setup config							# sets up config.json
     bench setup backups							# sets up auto backup every 6hrs
     bench setup auto-update						# auto updates bench and your erpnext instance every day at 10AM
     sudo bench setup sudoers					# required to restart supervisor (if production is setup)
     bench config restart_supervisor_on_update on# restart supervisor automatically after update (if production is setup)
    

If all goes well, you should be able to switch to the new bench without any downtime. No change required in nginx/supervisor config.