i tried to backup the erpnext v14 in docker
$ docker compose --project-name erpnext-one exec backend bench --site one.mysite.in backup
i got the backup file 20230420_204703-one_mysite_in-database.sql.gz
then i tried
$ gunzip 20230420_204703-one_mysite_in-database.sql.gz
20230420_204703-one_mysite_in-database.sql
i got the .sql file
when i try to restore the file
$ docker compose --project-name erpnext-one exec backend bench --site one.mysite.in --force restore 20230420_204703-one_mysite_in-database.sql
but i got
Invalid path 20230420_204703-one_mysite_in-database.sql
to which path i have to restore the .sql file in docker based erpnextv14 installation
try full path to the file.
the command prompt executes from frappe-bench
the frappe commands generally execute under frappe-bench/sites
just the filename is taken as relative path.
1 Like
issue fixed , refered your solution
Hi, I am trying to restore erpnext on docker. Sadly there is no real documentation on the restore process. I have used that compose file frappe_docker/pwd.yml at main · frappe/frappe_docker · GitHub
I am doing the following:
Transferring the backup.sql.gz and files to the container volume.
docker exec -it <container-name> /bin/bash -c
cd /home/frappe/frappe-bench
bench restore-backup <backup-name>
Which is presenting me with the following error:
Traceback (most recent call last):
Fi…
login to frappe container
and execute
cp 20230420_204703-one_mysite_in-database.sql.gz /home/frappe/frappe-bench/
gunzip 20230420_204703-one_mysite_in-database.sql.gz
bench --site one.mysite.in --force restore 20230420_204703-one_mysite_in-database.sql
it asks for MySQL root password:
then restored works fine
after restore
does this migration needed compulsory?
docker-compose --project-name erpnext-one exec backend bench --site one.mysite.in migrate
or it is optional?
depends on schema changes in version upgrade.
if there was upgrade without any schema changes, you can skip.
run it once after restore just to be sure everything gets upgraded.