hi everyone!
How can i download backups from another server to a new server?
and how can i restore it?
I’ve got 1 problem left i cant restore my database on the right path when i run the step 1 below it says invalid path how can i fix this?
Step 1: bench --site your_current_site_name --force restore {path to SQL file backup}
Step 2: bench migrate
There must be some mistake in the the backup file’s path which you specified.
First i did it like this
- cd /tmp
2.wget [FILES BACKUP FILE URL]
3.gunzip [DATABASE BACKUP FILE.sql.gz]
after step 3 i run this
bench restore ~/tmp/[DATABASE BACKUP FILE.sql]
It says invalid path
Second i did tried
Step 1: bench --site your_current_site_name --force restore ~/tmp/[DATABASE BACKUP FILE.sql]
It says invalid path again
Typo in your path
You’re downloading the file in /tmp
, but using ~/tmp
in your path
~
expands to /home/[USERNAME]/
Just remove ~ from your path like so
bench --site your_current_site_name --force restore /tmp/[DATABASE BACKUP FILE.sql]
I tried that
bench --site your_current_site_name --force restore /home/frappe/tmp/[DATABASE BACKUP FILE.sql]
it gives me an error.
how can i find the proper directory of tmp… im very new at this…
Execute these commands
cd /tmp
wget [FILES BACKUP FILE URL]
I think you’ve already done the above two steps, so skip them
-
cd
to yourfrappe-bench
directory bench --site your_current_site_name --force restore /tmp/[DATABASE BACKUP FILE.sql.gz]
This should solve your problem
Extra notes:
DO NOT USE ~
The tmp
folder is in your root i.e. /
directory
~
means your user directory i.e. /home/[USER NAME]/
They both are very different. You have downloaded the backup using wget
in your /tmp
directory, whereas you’re trying to restore it from /home/frappe/tmp/
, which doesn’t exist, hence you’re getting the error.
Also on a side note, using gunzip
is not necessary
Thank you very much…