Frappe docker - Bakcup & Restore

Frappe has a built-in “bench backup” and “bench restore” function.

But in a docker environment (specifically using docker compose), I have found it helpful to work with the backup files to and from the docker host. I created a post that describes that process here.

If you are wanting to move everything to a new server, there would be some additional steps beyond just a simple backup and restore.

Specifically, on the new instance before you restore, you will need to create the new site with “bench new-site” and make a note of the database name in the new instance since you will need that for the db restore.

Also, you will need to make a note of the encryption key on the old instance and manually add that to your new site_config.json or via the “bench set-config” command.

Additionally, it wouldn’t hurt to run “bench migrate” when you are done, especially if you are restoring to a newer version than the backup is from. If there are new apps in the newer instance, you will need to install those to the site with “bench install-app”.

That’s all I have had to deal with, but your specific situation may entail some other variables as well.

2 Likes