ERPNext backup restore issue in docker

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

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.