How to Update local erpnext custom app to new live server?

Hello,
I have setup ERPNext on AWS Hosting, Now i want to update my localhost erpnext custom application to live server.
i have installed a fresh erpnext setup in server.
Please tell me how to do it?

HI @Aarti_Khajuria,
Please refer this link

to learn github.

Thanks

@Aarti_Khajuria

Create a git repository for your custom app on Github.
Push your customization there.
Then you can install your app on your server using your git repository.

bench get-app app_name git_repository_path
bench install-app app_name

For git, basics refer this
Git for Beginners

@Aarti_Khajuria

Prerequisites

  1. Ensure you have the same versions of Frappe & ERPNext

The easiest way if setup properly


  1. Create a GitHub rep of your custom application
  2. Get the custom app to your localhost using bench get-app [app-name] [repo-link]
  3. Install using bench install-app [app-name]

Hello,
I have not done any changes in core file.
I have only changed the desk forms and uploaded the new product and created some flow.
That changes , i want to upload in live server. please tell me how to do that.

@Aarti_Khajuria

If that’s the case, you’ll need to back up your AWS install and then restore on your local version. That would be the easiest way.

On AWS using terminal:
`

  1. bench backup --site [SITENAME]
  2. Download the file from either
    – Setup > Data > Download Backups >
    or
    – FTP to your AWS Server and the path is ~/frappe-bench/sites/[SITE-NAME]/private/backups
    and download
    On Your Localhost:
  3. Place the file you downloaded in ~/frappe-bench
  4. bench --site [SITE-NAME] --force restore [DOWNLOADED-BACKUP FILE]
  5. bench --site [SITE-NAME] migrate
    `
1 Like

@Aarti_Khajuria

In which app you did the changes? [quote=“Aarti_Khajuria, post:5, topic:22658”]
I have only changed the desk forms and uploaded the new product and created some flow.
[/quote]

Check the changes in frappe/ERPNext/Custom App commit it and push to your git repository and pull it on your server.

Seems like you did the changes in frappe. Better way you can maintain your customization in custom app. Refer - Make a New App

Thanks It works

@Sangram @saidsl
If the custom app has been created at ERPNext server and I have new server with new ERPNext version, and I need to deploy my custom app at the new server of the new ERPNext version, then I can use the same method? Or the new server should has the same ERPNext version?

Regards
Bilal

@bghayad

ideally, they are the same version, however, provided the versions are not too far apart you should still be fine.

Note, that you still need to install the custom app to the new server as well, simply restoring from the other ERPNext will not work.

You would,

  1. Setup the new ERPNext
  2. Install your custom App
  3. Restore from the previous ERPNext Data to your new ERPNext

Regards
Said

Thank you @saidsl

How much should be not far apart? For example: if the old ERPNext is 9 and the new one is 10, is it fine?

About this point, I have really some questions that need to know them if possible:

  1. As restore will not work, so even if I copy the custom app from one machine to another machine and then I did install, it will not work?
  2. Can I know what exactly the install is doing? For example: to which files and directories is writing and what files are copying and distributing?

Regards
Bilal

To the best of my knowledge yes, 9 to 10 is considered a major upgrade, I did not have issues upgrading.

Not sure copying works, I generally, create a gituhub repo and pull the app to any installation I make. Its a much cleaner and resolved method.

The install is pretty straight forward really, once it install all the requirements it installs Frappe & ERPNext apps. Which is why I mentioned, ideally, you have your custom app in github repo that can be installed after you have installed everything.

Again I would recommend:

  1. Setup/Install a new instance of ERPNext.
  2. Create a github repo for you custom app
  3. Install your custom app from that repo
  4. Restore your data only from the old installation

I am pretty certain that if you do a manual copy of yhour custom app you will have problems.

Hope this helps

Regards
Said