VM error on update

After trying to switch to master and doing bench update --patch in VM i got error "bench.utils.CommandFailedEror :(‘–site,’ erpnext.vm’, ‘backup’) this is for brand new VM instance.

I also got error "bench.utils.CommandFailedEror :(‘–site,’ all’, ‘migrate’) no matter what I do. Even on a default VM after updating. Got the same error when tried to update my current working VM to latest version. Now I can’t even restore my database. Need help.

This is what I get after bench update on default VM machine.

When you said, Brand new VM, can you tell me the date stamp for that VM?

Also, try bench update --no-backup

With brand new I meant without me messing with it. :slight_smile:
I used 221215 for my test database. I tried to restore on this one and also on 250216.
I got a bit further on 25016 but i get error “ImportError: no module named formis” after migrating. – I had a custom app “formis” with two doctypes on my testing machine. If you have any Ideas please tell me correct steps how to restore my database to a new machine.
Thanks

Did you try doing bench update --no-backup? You can also update manually by doing git pull in both the frappe and erpnext directories followed by bench migrate.

Also if you wanna move to a new VM, you’re trying to restore a site which had your custom app in it and I guess the new VM doesn’t have that app. Here’s how you make it work :

  • If you don’t mind re-downloading there’s a newer build from 19th April and it comes by master as default. However, you don’t need to.
  • Take a Backup
  • Restore the backup on the new VM by running bench --site [sitename] --force restore /path/to/SQLFILE
  • Then run bench --site [sitename] remove-from-installed-apps formis
  • and then bench --site [sitename] migrate

That should do it.

Thank you @vjFaLk . You saved my day. Your solution did it. I used 190416 VM. Only extra step I had to make was this one from another post. Thanks again.

Now how do I get my app back? I assume I have to copy the app folder back to apps folder on new VM. And then?

Is your app on Github? (If not then just put it there) If so then just do bench get-app formis [github-link], that’s the best way and also good practice.

It worked. Thank you and keep up the good work.

1 Like