Taken from XBMC Wiki.
UPDATE art SET url = REPLACE(url,'nfs://192.168.0.2/','nfs://nas/');
UPDATE episode SET c18 = REPLACE(c18,'nfs://192.168.0.2/','nfs://nas/');
UPDATE movie SET c22 = REPLACE(c22,'nfs://192.168.0.2/','nfs://nas/');
UPDATE path SET strPath = REPLACE(strPath,'nfs://192.168.0.2/','nfs://nas/');
UPDATE tvshow SET c16 = REPLACE(c16,'nfs://192.168.0.2/','nfs://nas/');
$ sudo apt-get install sqlite3
$ cd ~/.xbmc/userdata/Database
# find newest MyVideos*.db
$ ls -1 MyVideos*.db | sort -r | head -n1
$ sqlite3 [VIDEO_DB_FILE] < commands.sql
Finally, update ~/.xbmc/userdata/sources.xml
to match.
UPDATE path SET strPath = REPLACE(strPath,'nfs://192.168.0.2/','nfs://nas/');
$ sudo apt-get install sqlite3
$ cd ~/.xbmc/userdata/Database
# find newest MyMusic*.db
$ ls -1 MyMusic*.db | sort -r | head -n1
$ sqlite3 [MUSIC_DB_FILE] < commands.sql
Finally, update ~/.xbmc/userdata/sources.xml
to match.