2019-09-21, 06:03
I'm running Mariadb as a central kodi db for my home. I've recently found a need to change the folder name of my movies.
/snapraid/pool/videos
to
/snapraid/pool/video
I have no idea how to work sql in the slightest. I know how to migrate a mythtv backend with the UPDATE command but I don't know how to list tables, or what they are called for Kodi.
Is there a simple way to do this? I have backups so a bit of trial and error won't kill me. I just don't even know where to start, or how to find the proper field to update.
*EDIT* A few minutes after this post the idea of backups occured to me. I dumped my databases to a non compressed file and just used sed. Then reloaded from that file. Working fine, took less than 2 minutes total. Posting solution. Use mysqldump to dump to file. Can find that info on Arch wiki.
Followed by import to mariadb / mysql
I restarted the service just to be sure.
/snapraid/pool/videos
to
/snapraid/pool/video
I have no idea how to work sql in the slightest. I know how to migrate a mythtv backend with the UPDATE command but I don't know how to list tables, or what they are called for Kodi.
Is there a simple way to do this? I have backups so a bit of trial and error won't kill me. I just don't even know where to start, or how to find the proper field to update.
*EDIT* A few minutes after this post the idea of backups occured to me. I dumped my databases to a non compressed file and just used sed. Then reloaded from that file. Working fine, took less than 2 minutes total. Posting solution. Use mysqldump to dump to file. Can find that info on Arch wiki.
Code:
sed -i 's/pool\/videos/pool\/video/g' $SQLDUMP
Followed by import to mariadb / mysql
Code:
cat $SQLDUMP | sudo mysql
I restarted the service just to be sure.