Download backups from another server

hi everyone!
How can i download backups from another server to a new server?
and how can i restore it?

1 Like

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

  1. 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]

1 Like

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

  1. cd /tmp
  2. wget [FILES BACKUP FILE URL]

I think you’ve already done the above two steps, so skip them

  1. cd to your frappe-bench directory
  2. 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

2 Likes

Thank you very much…