Clarification with restore command

Hi ,

I ran the below command

bench --site site2.local backup --with-files

and I got this

Now I just want to restore the entries that I have deleted , which file should I restore and with which command ( I am on v7 ) ?
Also please guide me in detail what the first file is and what the second file does ?

Please help

Thanks

The *.tar file is your files tarball, and the *.sql.gz file is you database backup.

Please check this link for restoring your files dan database: Restoring From ERPNext Backup · frappe/erpnext Wiki · GitHub.

-Lucky

1 Like

Thanks a lot for the reply , I referred the link but I am not clear with the below command

Restore Files
cp /tmp/[FILES BACKUP EXTRACTED FOLDER/---/public/files/*] [BENCH]/sites/[SITENAME]/public/files/

I understood one thing the sql file to be restored when I install the erp on another machine , and files.tar to restore the deleted entries, am I correct ?

Please guide me

I hope this help:

  • Untar and unzip both tarball and database backup files. Take a note on their path.
  • Login as frappe user then go to the frappe-bench folder
  • Run the following bench commands to restore db:
    $ bench --site {domain-name} --force restore {path to SQL file backup}
    or this command to restore db and restore private & public files backups:
    $ bench --site {domain-name} --force restore {path-to-SQL-file-backup} --with-public-files {path-to-public-files-backtup} --with-private-files {path-to-private-files-backtup}
  • Run these commands to run the latest restore:
    $ bench --site {domain-name} remove-from-installed-apps frappe_subscription
    $ bench --site {domain-name} migrate
  • If needed, enable scheduler for this site:
    $ bench --site {domain-name} enable-scheduler

-Lucky

2 Likes

Thanks a lot for the help , I will try

Thanks

1 Like