How to restore Backup

We want restore our backup in the system, so how we added in the system our backup.

bench —site [sitename] restore

Additional parameters:
—with-private-files (path to tar file)
—with-public-files (path to public files)

bench migrate

https://frappe.io/docs/user/en/bench/resources/bench-commands-cheatsheet.html

If the command that @schilgod gave you doesn’t work, then I have always used this command from the ~/frappe-bench directory:

sudo bench --force --site [site_name] restore /path_to_sql_file

This has never failed me. It has always worked since as far back as at least version 7 of ERPNext. I use it several time a week to move copies of the backup to other testing servers.

Hope this helps.

BKM

2 Likes

Hello,

Have understood the commands, but don’t know where I should be entering these commands. Which is the command line prompt for frappe for ERPNext Cloud… and how do I access it.

Excuse my ignorance, but I’m new to this whole thing.

This should help:

Precisely:

Never mind… post deleted.

You will have to contact the guys running the cloud to see if you can get command line access. Many of us here run our own servers and have that access from the beginning.

BKM

Hello !!

It ask for MYSQL root password. Where can I get it. there is not file like frappe-bench password.txt.

@bkm

If you are working from frappe cloud servers, then you probably not allowed access to the mariadb root password. I am sure they would want to keep that secure.

If you run your own server then it would be in password.txt file

BKM

I run my own server.
I can not find password.txt on the server.

@bkm

if you install erpnext through easy install script then password.txt exist, if you manually install it then reset your mariadb root password

If you used the easy install method then the password.txt file was placed in the home directory of the user that ran the install.

So, if you followed the directions exactly then the user would be “frappe” and the file would be in /home/frappe

For me I used “bkm” user so in mine it is /home/bkm/passwords.txt
BKM

Refer this video

1 Like

This worked for me but don’t forget to bench --site {site name} migrate
Thank you @bkm you always help via your contributions to the community.