Quick and dirty backup/restore

  • I was using OpenElec 8.0.3 on RPi when the system became unstable. Reboots, if at all, took 5-10 minutes. Having a fairly large movie-TV show library, a re-install was a daunting issue. My previous experience with export/import of video library showed that it took an inordinately long time and was not always successful.

    This is what I did:

    1) I copied the following directories and files from Userdata to one of my attached USB disks
    Database
    keymaps
    peripheral_data
    favourites.xml
    guisettings.xml
    profiles.xml
    sources.xml

    2) I did a fresh install of not OpenElec but LibreElec
    3) I copied over the above directories and files from the USB disk to Userdata directory
    4) Rebooted
    All my movies and TV shows reappeared after reboot. This procedure took me about 3 minutes. Previously, an export/import of video library took more than 24 hours.

    I hope this is helpful.

  • FYI, there has been a Backup/Restore tool in LibreELEC (and OpenELEC) for quite some time. It simply beats copying folders/files by hand. It's also much more userfriendly to the people new to Linux systems. Not to mention that you forgot to copy the .config and the .cache folders if you really want to make a decent backup.

    Re-installing LibreELEC/OpenELEC as a application and rescanning your video/music collection are two different things. The former is done pretty quickly (along with a backup of a good-running setup), the latter does not have to take that much time. Using a MySQL database on your file server unloads a Raspberry Pi from slow local database disk writes. Not to mention it prevents a lot of wear and tear on the RPi's sd card.

    A little RPi machine usually boots in under a minute. A 5-10 minute reboot either indicates you're using a sluggish class 4 SD card, or a shitload of repositories and add-ons have been installed. I'll refrain from asking further questions about those this time.

    Edited once, last by Klojum (April 20, 2017 at 4:54 PM).

  • Thank you for your reply. I'm aware of the backup/restore facility in both OpenElec and LibreElec. But backups and restores using this facility are not always successful and I'm not very concerned about system/Kodi backups. The point I wanted to make is that export/import of video library takes a very long time and the method I used certainly beats that.

    The boot time I experienced was not due to My SD card (Class 10) but because OpenElec became unstable.

  • If literally all you want is the video library just copy myvideosxx.db (where xx is the highest number present) from storage/.kodi/Database.
    Stick that in a new kodi folder, start it up and the library's there.
    Copying sources.xml from .kodi/userdata at the same time would be sensible.