This document will guide you to restore a backup from the raspberry root shell
Procedure #
1. Unzip the .bz2 backup file (E.g., alankarlatest22-07-2021.bz2 ) and copy the sql backup file to the flash drive (Just copy the file outside not inside any folders)
2. Make sure the unzipped file does not show any .sql extensions, it should just read the file name. (E.g., alankarlatest22-07-2021 )
3. Access the root by pressing Ctrl+Alt+F1 (User name: root, password: password)
4. Once inside the root type cd /opt/ (Press Enter key)
5. Type cp /flash/alankarlatest22-07-2021 /opt/ (Press Enter key, replace alankarlatest22-07-2021 with your backup file name!)
6. Type ls and check if the file copied to opt folder
7. Type cd and press Enter key to exit out of the opt folder
8. Type mysql -u root -p (Press Enter key)
9. When asked for the password type password and press Enter key (Password that you type will not be visible so make sure you type it correct!) This will enable the mysql prompt
10. Type use SALECULATOR; (Press Enter key)
11. Type source /opt/alankarlatest22-07-2021 (Press Enter key, replace alankarlatest22-07-2021 with your backup file name!)
12. Once the database run is completed press Ctrl+C to exit out of mysql prompt
13. Type reboot and press Enter key
Leave a Reply