How to Backup Kodi Library stored on NAS
#1
I'm sure I've seen the answer somewhere but I can't seem to locate it now.

I have setup a centralised Kodi library on my Synology NAS according to the official wiki page and all clients can access it successfully. I'm looking for a way to backup the library in order to be able to quickly restore it without having to recreate everything from the beginning in case of failure,  but I'm not sure what I need to backup. Should I log in from phpmyadmin to mariadb5 and export the MyVideos and MyMusic Libraries specified in my settings or is there an easier way? What about the "web" shared folder created on Synology as per the initial setup instructions, is this also required? Thank you all for your time.
Reply
#2
You could copy the database from within MariaDB5. In the "Operations" tab is a function called "Copy database to", where you can copy the selected database within the MariaDB serve.
I think all righthtinking people in this country are sick and tired of being told that ordinary, decent people are fed up in this country with being sick and tired.
Reply
#3
Thank you PH-SYM, I'll try that with both MyVideos and MyMusic databases.
Reply
#4
A copy of a database on the same database server is not a real backup IMO. A backup file needs to be located off the device that is being backed up. If that database server crashes, you still have nothing.

PHPMyAdmin has an Export function, else using mysqldump from the command line is another option for creating proper SQL backup files.
Reply
#5
Thank you Klojum as well. It goes without saying that I will be storing the copy of the database on another server. I have a second Synology NAS for backups; I just wasn’t sure what I needed to backup and how. Export it is then for both (MyVideos and MyMusic) databases! Is this enough?
Reply
#6
If you have both videos and music files scraped via Kodi, then yes you need to backup both databases. Make sure that all tables and objects are exported, including database functions & triggers and such, as well as the Create Schema option for auto-creating the tables when restoring your backup.
Reply
#7
(2018-03-28, 23:38)Klojum Wrote: A copy of a database on the same database server is not a real backup IMO.
That's true of course. I use that method before upgrading Kodi or whenever I think it might be a good precaution before tinkering with stuff. A backup in case the MariaDB is screwed up requires a proper backup, as Klojum as pointed out. Synology should be able to include the MariaDB when backing up to another Synology NAS.
Exporting the Kodi library to single files is also a (sort of) backup, convenient whenever you want to start with a fresh Kodi database.
I think all righthtinking people in this country are sick and tired of being told that ordinary, decent people are fed up in this country with being sick and tired.
Reply
#8
(2018-03-29, 22:35)PH-SYM Wrote: Exporting the Kodi library to single files is also a (sort of) backup, convenient whenever you want to start with a fresh Kodi database. 
That is not true for the music library. Music export saves the additional scraped artist and album information, but not the fundamental data - import to an empty db and you get nothing. To recreate the music library from a fresh db you would need to add music sources and scan the tags, then once library populated import the additional scraped artist and album information rather than rescraping from remote sites.

Sometimes it is nice to do that kind of rebuild e.g. new Kodi version fetching more from tags, or a clean start. But if you really want a disaster recovery back up copying the db is best.
Reply
#9
I have similar dilemma, and only difference is I am using QNAP NAS.
My question is there a way to automate process of backuping MariaDB with scheduler?Or external DB backupper?
Other question is my QNAP uses Maria 5.5., which seems older version, and there is no upgrade in sight.Does it support all Kodi requirements?
Reply
#10
This topic was an issue to me long time ago, but in the meantime I found simple solution that could help others:
There are several SQL backup applications, like SQL Backup and FTP.Free version allow backup of 2 databases and scheduled tasks.I have it installed on local computer and it works very nicely.
Reply

Logout Mark Read Team Forum Stats Members Help
How to Backup Kodi Library stored on NAS2