Update 'Migration notes'

Ken Fallon 2023-05-21 16:33:18 +00:00
parent cb460e56de
commit 41bcbb74e5

@ -2,6 +2,8 @@
* NEW ⇒ means the new server http://44.228.143.124/
* OLD → means the existing server 66.171.252.229
* Borg → the hpr pi
* HPR → the active server that the dns is pointing to
PHP 8.1
Apache 2.4.53
@ -26,7 +28,7 @@ Instead of PHP My admin we might use https://dbeaver.io/
## Synchronization until NEW = HPR
After every change, we can use the script `OLD:/home/hpr/bin/hpr_db_backup.bash` to trigger a db dump of the db,
On the NEW server we have a cronjob that will `rsync` every 30 minutes and then if it's changed import the db.
Have a cronjob that will `rsync`and import the db.
```
$ cat /home/hpr/bin/hpr_db_backup.bash
@ -37,6 +39,17 @@ mysqldump --user=hpr_hpr --password="$pw" -c -e --default-character-set=utf8 --s
mysqldump --user=hpr_hpr --password="$pw" -c -e --default-character-set=utf8 --single-transaction --skip-set-charset --add-drop-database --databases hpr_hpr --ignore-table=hpr_hpr.reservations > /home/hpr/www/hpr.sql
```
### Todo
Possibly do this on BORG ?
- [x] Manually trigger export of DB
- [ ] Rsync copy down to borg
- [ ] check the sql into git
- [ ] have git trigger if there is a difference to
- [ ] rsync file to NEW
- [ ] import db to NEW db
# Redirects