Skip to content

Restoring From ERPNext Backup

Rushabh Mehta edited this page Jan 4, 2016 · 11 revisions

Downloading Backups

  • Download backup files
cd /tmp
wget [DATABASE BACKUP FILE URL]
wget [FILES BACKUP FILE URL]
  • Unzip files
gunzip [DATABASE BACKUP FILE.sql.gz]
tar xvf [FILES BACKUP.tar]

Version 5/6 (Frappe Bench)

  • Go to the frappe-bench folder
  • Run the following frappe commands (to restore db and run latest)
  • Note: You can also restore using mysql
bench --site [sitename] --force restore /path/to/SQLFILE
bench --site [sitename] migrate
  • Restore Files
cp /tmp/[FILES BACKUP EXTRACTED FOLDER/---/public/files/*] [BENCH]/sites/[SITENAME]/public/files/

Version 4 (Frappe Bench)

  • Go to the frappe-bench folder
  • Run the following frappe commands (to restore db and run latest)
  • Note: You can also restore using mysql
bench frappe --restore DBNAME SQLFILE
bench frappe [SITENAME] --latest
  • Restore Files
cp /tmp/[FILES BACKUP EXTRACTED FOLDER/---/public/files/*] [BENCH]/sites/[SITENAME]/public/files/

Version 3

  • Go to your ERPNext installation folder
  • When restoring from database, the 'Administrator' user password gets reset to 'admin'. To set a better password when restoring, set admin_password variable in conf.py to the desired 'Administrator' user password.
  • Restore database using:
lib/wnf.py --install [DATABASE NAME] /tmp/[DATABASE BACKUP FILE.sql]
  • Copy extracted files
cp /tmp/[FILES BACKUP EXTRACTED FOLDER/---/public/files/*] [YOUR ERPNEXT INSTALLATION]/public/files/
Clone this wiki locally