System Back up either hangs or the resulting files are hit and miss

  • I have had this issue under various versions running on different pi3's. In the interest of full disclosure, i had similar issues under OE on several Chromeboxes.

    Either the backup hangs requiring the power cord to be pulled or the backup finishes but the file refuses to restore.

    Is there any easy solution for this? Is either any way to check the file after it has been completed to make sure that it will be able to be restored?

    Alternatively, I guess that I could use one of the backup addons but I would prefer to use LE own.

    Any suggestions will be greatly appreciated.

    Thanks.

  • Sorry not sure what docker is so almost certain I am not using it.

    Varies, I can really deal with the failed / stuck backup because at least it is clear to me that it is not a good backup. The issue is with the ones that do complete because that gives me a false sense of security that I have a good backup should something happen.

    If there was a way to check the resulting file before one needs it then that would great.

    Thanks.

    • Official Post

    Where are you trying to backup to?

    Does that location have a big enough available disk size?

    Does it actually freeze your box or perhaps the zipping process is having a hard time, but it still might be busy.

  • On the pi3's have tried both internally to a card that has enough free space to store at least 5 times the resulting file size and to a USB drive that has enough free space to store at least 25 times the resulting file size.

    On the Chromeboxes, but that was using OE, much more free space because of the HD and to a Qnap NAS which has 2tb free space.

    Just freezes the box, even if left overnight comes back to the same stuck percentage, as the night before, and a frozen box. The resulting file when it does work (although as per above the restore may or may not work) is about 2.6gb.

    Thanks.

    • Official Post
    Code
    cd /storage
    systemctl stop kodi.service
    rm -rf .kodi/temp/*
    tar -cvf backup.tar .kodi .cache .config
    systemctl start kodi.service

    That's basically what the backup routine does (except the cleanup of temp, which is just a good idea). Watch the on-screen output for errors, warnings and long time delays where it gets stuck and has to wait for something.

  • That was very helpful.

    I will have to run it more than once because that one went through without a hitch. However, I could not locate the tar file. I now have a temp folder under the temp folder but it is empty /storage/.kodi/temp/temp and I do not see a i do not see a new tar file under /storage/backup although I would not have expected to see one.

    Was the code supposed to result on a tar file? If so, where it would be?

    I am assuming that I can just change #3 to /storage/backup and if it works the new tar file should be there?

    Once there is a tar is there a way to pre-check the file without having to go through the restore process?

    Thanks.

  • Yes you are right I was looking in the wrong spot.

    How about a way to test the file? At times through the LE tab it has properly finished the backup but I have been unable to use that file to restore. Or should that not even possible and once the backup properly runs it course to the end there is no way that the resulting file should have any issues?

    Thanks for the assistance and information.

  • Code
    systemctl stop kodi.service
    mv /storage/.kodi /storage/.kodi-old
    tar -xvf backup.tar
    systemctl start kodi.service

    ^ something like that will move the existing Kodi folders out of the way then unpack the backup to recreate folders and test by restarting Kodi. To make and restore backups and test them you'll need 2x-3x the size of the backup as free space on /storage

  • I have now tested the backup I made using your June 10th instructions.

    I tried restoring through the LE screen and it will go through the files up to 100%, then ask for reboot permission, it reboots but then it goes straight into Kodi without going through the restore and once in Kodi I could confirm that it was still the un-restored build.

    Following your June 11th test instructions I was able to successfully restore.

    I am not entirely sure why it works manually and not through the LE screen, but at least I have a confirmed process to make a valid backup. I do not foresee requiring full system backups and even less restores so I do not mind the extra steps.

    I apologize before hand as I am not a Linux guy but if I wanted to save the backup on an USB drive called PATRIOT, will this change to line 4 do it:

    4. tar -cvf /var/media/PATRIOT/backup.tar .kodi .cache .config

    and for the restore

    3. tar -xvf /var/media/PATRIOT/backup.tar

    and if I wanted the filename to be the date/time:

    4. tar -cvf /var/media/PATRIOT/"le$(date +%Y%m%d%H%M%S).tar" .kodi .cache .config

    Would that be the correct syntax for all three scenarios?

    Thanks.

    • Official Post

    Looks about right. You cannot harm/bork anything from experimenting :)

    Random thought: Are the back-ups you're restoring from an "XBMC" install, or from a "KODI" install? .. because files backed-up from /storage/.xbmc will be restored to /storage/.xbmc and these days Kodi expects to find everything /storage/.kodi which would result in no new (old) files needing to be migrated and you'll see the box just start-up into Kodi, which is what you originally described.

  • LE8.2 so Kodi, right?

    Thanks will try :). The only bit that I was not entirely sure is whether the closing " on the filename should be as shown or just before .tar, that is not enclose the file extension as well.