Hi, I'm planning to migrate a flarum instance with an old version to another webserver. Had some issues with on the old webserver and couldn't update some requirements. I already migrated the other applications and that was running smoothly. So everything besides flarum is running on the new apache2 server.
For the migration I have some questions. As I haven't found any information regarding a backup & restore or migration scenario between different webservers I made a sort of migration plan.
Before I go into details, a few questions:
- Is there some documentation on backup & restore migrations? Only found other forum migration tools and an unanswered question here.
- Is my intended migration plan even possible with these major release cycles behind?
- If its possible, am I missing anything in the migration plan?
- Have directories for assets changed inbetween these versions that should be accounted for while restoring?
- Is there other data that should be backed up and restored?
Flarum information old webserver
Flarum 0.1.0-beta.8.1
PHP 7.3.28-1+ubuntu18.04.1+deb.sury.org+1
MySQL 5.7.42-0ubuntu
Flarum information new webserver
Flarum 1.8.0 (hopefully)
PHP 8.1.2-1ubuntu2.14
MySQL 8.0.34-0ubuntu0.22.04.1
Migration plan (tested on ubuntu 22.04 with lamp)
- Install flarum in new directory (composer create-project flarum/flarum .)
- Create virtual host directing to flarum directory in apache2
- Set permissions for directory (https://docs.flarum.org/install#folder-ownership)
- Backup assets and config on old webserver (tar -czvf flarum-files-backup.tar.gz config.php public/assets/)
- Backup database on old webserver (mysqldump -u root flarum > flarum.backup.sql)
- Create database for flarum on new webserver and create new user with privilges (in mysql> CREATE DATABASE flarum; CREATE USER 'flarum'@'localhost' IDENTIFIED WITH mysql_native_password BY 'h1ghsecuritypswd'; GRANT ALL ON flarum.* TO 'flarum'@'localhost';FLUSH PRIVILEGES; )
- Restore database on new webserver (mysql -u root flarum < flarum.backup.sql)
- Restore files in flarum directory on new webserver (tar -xvzf flarum-files-backup.tar.gz)
- Update config.php with new database credentials
- Set permissions for directory (https://docs.flarum.org/install#folder-ownership)
- Check flarum through browser and follow migration instructions
- Run update in directory (composer update --prefer-dist --no-plugins --no-dev -a --with-all-dependencies; php flarum migrate; php flarum cache:clear)
- Install old extensions not in new composer.json
- Check browser and enable extensions in administration dashboard