22 Migration notes
Ken Fallon edited this page 2023-06-21 14:50:17 +00:00

Migration

  • NEW ⇒ means the new server http://44.228.143.124/
  • 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

PHP 8.1 Apache 2.4.53

Database

The database from HPR needs to be on the NEW server.

Until we move the DNS to the new server we need to update the DB o

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, Have a cronjob that will rsyncand import the 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 -av --partial --progress /home/hpradmin/sourcecode/hpr_generator/public_html/ hpr1:/home/hpr/public_html/ # transfers it to the NEW site.
  • [hpr@ip-10-10-33-112 ~]$ mysql --host=localhost --user=root --password hpr_hpr < hpr_hpr.sql

Web Pages

Redirects

Apache redirects from old to new pages

CMS

Only copy over the PHP files that are going to be in use.

Move supporting files, like say.php and stats.php to the protected HPR directory.

Crontab

$ crontab -l
SHELL="/bin/bash"
0 0 * * * /home/hpr/bin/hpr_db_backup.bash > /dev/null 2>&1
#20 * * * * php -f /home/hpr/bin/host_image.php  > /dev/null 2>&1
##* * * * * if [ -e /home/hpr/ftp_hprvps/hprstreamingstats.png ]; then mv /home/hpr/ftp_hprvps/hprstreamingstats.png /home/hpr/www/images/hprstreamingstats.png ;fi  > /dev/null 2>&1
15 2 * * * /usr/local/cpanel/3rdparty/mailman/bin/list_members -o /home/hpr/mailist.txt "hpr_hackerpublicradio.org"

Replicate Media

  • The IA
  • Rsync.net - we have hit a limit on the amount of data there.
  • Ken's offline disk
  • Dave

TODO

https://httpd.apache.org/docs/2.4/rewrite/remapping.html

contribute.php request_a_slot.php request.php stuff_you_need_to_know.php requested_topics.php stuff_you_need_to_know.php

.

.

In order to move to the live site a series of changes is needed.

The sqlite driver, baseurl and hub_baseurl need to be defined in the site.cfg

The location of feeds is moved.

Meet the team is removed to point to php version.

comment feed is moved from php to static.

HPR TODO LIST

HPR will move #oggcastplanet on libera - done Remove Google+ from footer Figure out why todays feed did not hit mastodon (it's only a /me thing) Convert links in DB to https