How can I schedule a backup of all Splunk configuration files?
Create a python / shell script to do the backup work and schedule it. If you have Splunk distributed environment then your script should take care of the other search peers as well as forwarders.
You usually just need to backup the content of the $SPLUNK_HOME/etc/ folder to be able to restore the configuration.
Be aware that CSV files created with outputcsv command will usually be outside of /etc directory. In case you have important CSV files here, make sure that those are backed up as well.