aksh I'd just go with mysqldump -u your_db_username -p password your_database_name discussion_user discussions posts users group_permission group_user groups > dump.sql
. This command backups your posts, discussions, permissions, groups & users tables (you can specify additional tables too).
You can then import it into an existing Flarum database with mysql -u your_db_username -p password your_database_name < dump.sql
, or archive it to minify the size before (that's essentially what we are doing at FreeFlarum). You should also backup your Flarum assets
folder to keep your user avatars safe. Note that the commands above are for Linux terminal and for MySQL database.
Or, you can also search for discussions about this topic to browse some other alternatives: https://discuss.flarum.org/?q=backup