Hmmm ... least common denominator .... System Admin Category/Course - hidden - none assigned ... using moodle page resource or plain old text files (makes it easy to copy and paste to CLI/other). Backup course, restore course is one way.
But ... dumping config from Windows PC and importing into Linux server would be an adventure ... paths alone ... C:\something\Windows to /paths/to/ that are in files and tables of the DB itself. Ditto for localhost Mac.
Changing the config.php file is required ... and won't change all the internal links/tables in the DB.
There is a CLI tool (php script) now in moodlecode/admin/cli/ called cfg.php ,,, appeared in a
php cfg.php [ENTER] shows all settings.
php cfg.php |grep 'session' shows all settings related to 'session'
php cfg.php > allsettings.txt creates a text file ... which could be linked to in the System Category/Course mentioned above.
Importing into DB ... another issue ... how many tables does a basic Moodle have ... over 300+ and with plugins ... 400+. User info for example: basic moodle profile: mdl_user but if site had created required user profile fields those are in another table (that's problem right now for LDAP/Oauth2 Custom/as well as SAML2 - know that from first hand experience).
2 cents.
'spirit of sharing', Ken