If you want to know the value of $SPLUNK_DB that Splunk is using, you can use this command
`ps -ex | grep --color SPLUNK_DB`
then you can declare the same var in your enviroment
export SPLUNK_DB=/opt/splunk/var/lib/splunk
and finally copy the files .
As you posted, in this doc you cand find the file were SPLUNK_DB is defined.
... View more