adding restore command for latest version

Karthikeyan S
2019-07-05 12:27:57 +05:30
parent 44a96bb9e8
commit 1cd699918b

@@ -7,12 +7,32 @@ wget [DATABASE BACKUP FILE URL]
wget [FILES BACKUP FILE URL] (this URL is to be made based on what is shown on the DATABASE BACKUP FILE URL)
```
* Unzip files
* Unzip files (_this step is not necessary for the latest version_)
```
gunzip [DATABASE BACKUP FILE.sql.gz]
tar xvf [FILES BACKUP.tar]
```
### Version ~9+ (Restore via Frappe Bench)
To restore a site database you need to first have/setup a working site. Once you have a working site, you can use the following steps to restore your database.
* Go the bench folder, which is usually `frappe-bench`
* Run the following `bench` commands to restore your database and files
> Note: the following command will overwrite existing data.
```
bench --site [sitename] --force restore [path to database backup file] --with-private-files [relative-path-to-private-files-backup-file] --with-public-files [relative-path-to-public-files-backup-file]
```
- `[sitename]` - the name of the working site to which you want to restore your data.
- `[path to database backup file]` - path to database backup file that you downloaded (this path should be a relative path from the current bench directory). The name of this file usually ends with `...-database.sql.gz`
- `[relative-path-to-private-files-backup-file]` - path to private files backup file that you downloaded (this path should be a relative path from the sites directory). The name of this file usually ends with `...-private-files.tar`
- `[relative-path-to-public-files-backup-file]` - path to public files backup file that you downloaded (this path should be a relative path from the sites directory). The name of this file usually ends with `...-files.tar`
##### Restoring only the database
* If you prefer to restore only the database, you can do so by running the following bench command.
```
bench --site [sitename] --force restore [path to database backup file]
```
### Version 8 (Frappe Bench)
* Go to the `frappe-bench` folder