I think to backup a wallet copying the wallet.dat file should be enough but if you want to backup the
private key or the master private key you can use dumpwallet command sample command below
dumpwallet "yourwalletsname"
For a single private key, you can use this command below.
dumpprivkey "bc1sampleBTCaddress"
These two commands do not work on the newer wallet version.
Both commands are stricktly functional on a legacy wallet
as per the Console feedback error code -4