How to recover backup copy to my Pi3

  • I need to restore a LibreELEC backup located on a network drive on a smaller card than the one originally created from. The backup si 1.4 GB, the free space is 2 GB. It should fit, because the tar is not compressed.

    The usual restore process first downloads the backup file and saves it on the card and then reboots and tries to extract it from there. And fails, because now there are only 0.6 GB of free space remaining. Is there a way to directly extract a backup from a USB stick or network drive?

  • I moved your post into a new thread, posting in an outdated thread is not always handy.

    If you have disk space problems, open a SSH connection, mount to your network location if necessary, and use a direct tar command to restore a backup file:

    tar -xvf /path/to/your/backupfile.tar.gz -C /storage

    Not sure if you need the -C option, as you would be already in the /storage partition by default entering a SSH session.

  • The backup file is a standard .tar archive so it's nothing special and if required you can unpack it on the network share (whether Linux NAS or a Window box) and manually move files back over. The restore process is nothing magic, it's basically just stopping Kodi, removing 'new' folders that are auto-created on install, then moving old files/folder back to the right locations and then restarting Kodi again.

  • Thank you.

    Just one more question for the future: If I do something wrong and I need to restore a backup, do I empty /storage first and then extract or extract overwriting what's there? Are there any files in /storage that are needed but not backed up?

  • Always stop Kodi and rename or move folders out of the way first. If not you might end up with new (empty) versions of essential Kodi DB files and Kodi will not detect and automatically update/migrate your DB's to the latest schema version on first run.

    The backup .tar covers /storage/.kodi (essential) and /storage/.config (essential if you modified anything there, otherwise not) and /storage/.cache (nothing essential, worst case you reconfigure a wireless password). Nothing else is included, so nothing else needs to be renamed/moved out of the way when manually restoring.

  • I'm having an issue restoring a backup made with a Leia nightly. Not sure if it's related to the build not being the same as when I made the backup. When I restore it copies the tar to .restore however nothing happens on a reboot. So I've manually restored the tar with the above command however this creates a folder called storage within storage. So I did this instead:

    1. cd /
    2. tar -xvpf ~/.restore/filename.tar storage