The database is an sqlite3 file, and you can simply copy these files to another location. Be sure that there is no activity on the file when you do this, for example don't do a library clean and then prompty copy the file.
I have a script on my remote system that uses:
scp -r
pi@raspbmc.local/:home/.xbmc ./rasppi
at its core i.e. it copies the .xbmc directory and all its content to a local folder. I've restored the data many timewithout any ill-effect!
There is a program add-on that will copy the usrdata but I can't recommend it at all. Totally trashed my own set-up, at least in my mind it did, so I'd be careful with it.
You can also look at the database using the sqlite3 tool. Try for example:
sqlite3 .xbmc/userdata/Database/MyMusic32.db
You will have a new "sqlite>" prompt and can manage the database. Some examples:
.tables ... will list tables in the database
select * from artist; ... list all database entries. Note these is a closing ; on these lines
select count(*) from artist; ... count the number of artists
.exit .. .to exit
The database queries are standard SQL, so there are plenty of tutorials concenring usage.
The point is there are .dump and .backup commands. I'd suggest Googling sqlite3 on how these might be used, then ask further questions on this forum.
You can remove the SD and carry out a bye-by-byte clone of it to some different media. Since the OS on the SD is not active, this is quite a robust backup procedure i.e. files are not open and can be copied with confidence. You will want to investigate the dd command (on Linux); MacOS and Windows have simialr utilities. Try searching this forum for backup, there are plenty of entries.
Hope this helps, and gets you up and running.
Dave