This guide was prepared in the event of a catastrophic failure, new computer purchase, or a computer needs re-installing.
Recovery Locations:
- VPS Server (via Managed Hosting Support)
- The Smurflings (External HDD’s on office desk)
- Sassette (6TB USB 3.0 – Ext4)
- Snappy (6TB USB 3.0 – NTFS)
- Slouchy (1.5TB USB 2.0 – NTFS)
- The SmurfVillage (Local network)
- HeftySmurf (Desktop: Ubuntu 20.04/i9/32GB/1TB)
- AstroSmurf (Laptop: Ubuntu 22.04/i7/16GB/512GB)
- bash scripts
- installwebserver.sh
- filesystembackup.sh
- filesystemrestore.sh
Production Web Server
- Managed VPS Hosting
- PapaSmurf (CentOS, 80GB SATA HDD, 2.5GB RAM, 70TB Bandwidth)
- submit ticket to VPS Support!
Development Web Server:
Rather than try to recover software that is not working correctly, I find it quicker to do a fresh install before moving on to the Restore Files and Web Server Configuration steps listed below. These next few steps are exactly the same as from the Setting up a LAMP Web Development Workstation on Ubuntu article.
Create a Web Development Workstation on Ubuntu:
- Install Base OS (Ubuntu) || Install Ubuntu on VMWare Guide
- sudo mkdir ~/web
- sudo chmod -R 777 ~/web
- Install and Configure
git
on Ubuntu Guide- ssh-keygen -t ed25519 -C “<comment>”
- nano ~/.ssh/id_ed25519.pub #copy to GitLab account
git clone git@gitlab.com:sipofwater/scripts.git ~/web/scripts
- Ubuntu Software -> vscode -> install
- Install and Configure a LAMP Server on Ubuntu Guide
- bash ~/web/scripts/webserver/installwebserver.sh
- Implement Backup Guide
Restore Files and Web Server Configuration:
- Restore files from backup:
- Copy
/Sassette/HeftySmurf/daily/<date>
fromExtHddA
to~/Desktop
- Restore
/sites-available/
- Restore ~
/web/webroot/
- Restore ~
/web/sandbox/
- Copy
- Restore Configuration Settings:
- Run filesystemrestore.sh (which also calls below)
- Runs
restore-a2ensite.sh
- Runs restore-db.sh
- Runs
- Run filesystemrestore.sh (which also calls below)
Restore Databases:
- Re-attach MySQL databases(??)
sh ~/web/scripts/mysqlrecovery.sh
(NEED TO WRITE)- Database(s) and data
- MySQL Procedures (reset permissions)
Rebooting & Testing:
- Reboot
sudo service apache2 reload
- Test the shit out of everything!
- git back to work!!
Outstanding ToDo’s:
- Visual Studio Code
- theme
- enabled / disabled / (other) settings
- Chrome + dev tools
- Card Color Titles for Trello (Chrome extension)
- JSON Viewer
- React Developer Tools
- Web Developer
- node / npm / nvm /
- Gnome
- Testing recovery from backups to ensure works!
- Compression
- test compression
- write script to automate testing websites work
Questions:
- lots of sudo’s, how to remove?