How can I import/export settings into a file?

Have a look at Backup only Site Settings - #5 by pfaffman. You need to download the script from github and have Ruby installed.