Good Migrations: Migrating Moodle to a New Server

แชร์
ฝัง
  • เผยแพร่เมื่อ 7 ก.ย. 2024
  • This is how to migrate a Moodle (including the wwwroot, moodledata, and SQL database) from one server to another AND changing the URL. For specific parts, please use the timestamps below:
    0:13 A question from a viewer
    0:35 Overview of what will happen
    1:35 Backups - the heart of a good migration
    3:24 Introducing the old_server and the new_server
    5:30 Finding the path to your Moodle code
    7:25 Finding the path to your Moodledata directory
    9:30 Finding the database name from config.php
    9:55 Putting the moodle on old_server into maintenance mode
    12:20 Looking at the files and setting permissions to make copying files easier
    15:00 Dumping the SQL database
    18:20 A small note on file permissions of the SQL dump
    20:04 Setting up the SSH for old_server to connect to new_server
    23:05 Setting up SSH keys for password-less login
    24:50 Explanation of rsync -- Also, me trying to run rsync from the wrong server (oops!)
    29:14 Getting on the right server and running rsync again -- Also troubleshooting destination permissions issues
    31:25 rsync finally running (blink and you'll miss it, it's fast)
    35:25 START working only on new_server
    35:40 gunzipping the SQL dump file
    37:15 Making the postgreSQL database on new_server
    38:33 Me accidentally pasting a MySQL command where I meant to use a PostgreSQL command -- goes about as well as you might expect
    39:19 Troubleshooting the MySQL command
    40:20 Creating the PostgreSQL database
    41:15 Importing the database contents from the SQL dumpfile
    42:42 Editing config.php to add the new server's configuration
    44:55 Changing the Nginx Virtualhost file to point to the Moodle
    48:50 I surprise myself when it works unexpectedly...
    50:50 Simulating a common file permissions issue
    53:08 Surprised again when it works without doing find/replace
    55:05 Running database find/replace tool to change hardcoded URLs
    58:01 Alternative to find/replace tool (using sed -- didn't work, didn't fix LOL)
    1:00:50 One last thing... adding a cronjob for the new server
    1:03:00 Final checks and final words... Setting file ownership to www-data

ความคิดเห็น • 27