Moving an existing development instance to a new server

Hello all

I’ve lost my Linux Mint OS, but can still mount and access my /home/… directory, containing the frappe apps and sites. On this server I had a number of Frappe v15 apps, and some custom apps. I did not use git to keep an off-site repo of the apps.
I have backups of all the sites, a day or two prior to the failure, so I can recover the data from the backups.

I’ve installed Linux Mint on a new SSD, and installed all the software such as MariaDB, etc. I also installed / init Frappe Framework afresh. It’s all working fine.

My question now is how should I proceed with restoring the other apps / sites?

Do I create new apps, and then replace all the files with the copies I have? If so, I guess the apps is easy, as I can simply copy the files from my previous directories to the new /home/…

The sites and their data is not as obvious as to how I should proceed. Do I try and move the entire MariaDB to the new OS, and then somehow try and link each site to a specific DB. Or do I need to import all the data via the backups?

Has anyone had a similar situation?
Are there any documentation on doing this?

Thanks so much for any advise that could help in this regard.

Hi @EugeneP

You have both choice for this issue

  1. If you have site_config.json of older sites, then you can move whole database to new OS and change database name and password.

  2. If you don’t have any data from last OS expect database zip file, then go with restore database that

2 Likes

Frappe backups (always done at the site-level) consist of up to four files:

  • a site SQL export
  • an archive of your public files
  • an archive of your private files
  • your site_config.json file

The bench command bench restore will allow you to specify a location for these files, and your site will be recreated. You should be able to install all the apps again using the bench install-app command. Reinstalling is usually a better approach than copying them over manually.

In practice, things sometimes get a bit more complicated, but this is a good starting point for restoring your site.

2 Likes