Update 'Migration notes'
parent
97d222a750
commit
a6180cbe7f
@ -1,7 +1,7 @@
|
||||
# Migration
|
||||
|
||||
* NEW ⇒ means the new server http://44.228.143.124/
|
||||
* OLD → means the existing server 66.171.252.229
|
||||
* OLD or binrev → means the existing server 66.171.252.229
|
||||
* Borg → the hpr pi
|
||||
* HPR → the active server that the dns is pointing to
|
||||
|
||||
@ -30,40 +30,13 @@ Instead of PHP My admin we might use https://dbeaver.io/
|
||||
After every change, we can use the script `OLD:/home/hpr/bin/hpr_db_backup.bash` to trigger a db dump of the db,
|
||||
Have a cronjob that will `rsync`and import the db.
|
||||
|
||||
```
|
||||
$ cat /home/hpr/bin/hpr_db_backup.bash
|
||||
#!/bin/bash
|
||||
pw=$(grep -E '^\$password = ' /home/hpr/php/include.php | awk -F "'" '{print $2}' )
|
||||
pw=${pw##* }
|
||||
mysqldump --user=hpr_hpr --password="$pw" -c -e --default-character-set=utf8 --single-transaction --skip-set-charset --add-drop-database --databases hpr_hpr > /home/hpr/hpr_hpr.sql
|
||||
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
|
||||
|
||||
- hpr@binrev:/home/hpr/bin/hpr_db_backup.bash # generates the latest update
|
||||
- hpradmin@borg:/home/hpradmin/sourcecode/hpr_generator/utils/update-hpr-db.sh # downloads the db and converts it
|
||||
- /home/hpradmin/sourcecode/hpr_generator/site-generator --all # generates the static site
|
||||
- rsync # transfers it to the NEW site.
|
||||
|
||||
# Web Pages
|
||||
|
||||
## Setup hpr_generator on borg
|
||||
|
||||
- [ ] Using the account `hpr@borg` clone the repository `/home/borg/sourcecode/hpr_generator`
|
||||
- [ ] Install all the additional libraries
|
||||
- [ ] Export to `???????`
|
||||
- [ ] Rsync it to NEW
|
||||
|
||||
@roh`n can we discuss these steps.
|
||||
|
||||
@ken I have installed hpr_generator in my rho_n directory on borg. I have it running. I didn't see a `/home/borg` directory. I can move things once we have a chance to go over things.
|
||||
|
||||
### Redirects
|
||||
|
||||
Apache redirects from old to new pages
|
||||
|
Loading…
Reference in New Issue
Block a user