There are a lot of posts about backups and restoring Flarum and all are completely different and there are a lot of different opinions.
I am trying to figure out what exactly must be backuped to be able to restore the forum again?
And how to restore the old forum if something went horribly wrong after e.g. updating?
Important: Only necessary data and steps. No cache, trash or temporary data should be backuped. The minimum.
What I figured out so far?
The public directory of Flarum
Backup /<path_to_flarum>/public
It contains all data of the forum, like uploaded data, icons, logos, avatars, fonts, etc.
IMHO the whole flarum dir don't have to be backuped. Please tell me if I am wrong.
The composer file
Backup /<path_to_flarum>/composer.json
It contains all information to install all needed extensions. Is composer.lock needed?
Dump the database
mysqldump -u <username> -p"<password>" <database_name> > flarum.sql
It contains the whole database. Are there tables not needed? Maybe temporary tables?
Is this correct?
- Is this all what should be backuped?
- Did I forget something?
If everything is correct, I will create a script and publish it so others can use it to make minimal and clean backups and restore forums.