How to make a backup of kodi?

  • I'm so sure there used to be a backup function in there somewhere. I can't find it anymore.

    Nothing on the wiki about this anymore.

    How to make a backup of kodi?

  • Go to Best Answer
  • Hello,

    In the LibreELEC Settings:

    Addons -> LibreELEC Configuration -> System -> Backup -> Create System and Kodi Backup

    in the Kodi Add-on repository

    Download under Program Add-ons

    -> -> Backup

    and the create with this Add-on the Backup

    Regards

  • Most stress-free option for me was to just create in image of the sd-card with the win32 disk imager. You obviously need the harddrive space to back it up. 20 min to back it up and another 20 to create new if needed. The build in backup software just crashed or did inncomplete nonsense for me.

  • I cannot confirm your presentation because I always make backups and import them again!

    Quote


    harddrive space to back it up

    A backup has to be stored somewhere and you also need hard disk space

    Quote


    20 min to back it up and another 20 to create new if needed

    is relative .. depends on what you have installed everything

    Quote


    The build in backup software just crashed or did inncomplete nonsense for me.

    i never had any problems

    Regards

  • If you want to automate the backup you can make an executable script scheduled from cron similar to this:

    Bash
    #!/bin/sh
    # fullbackup.sh script
    tar cf /storage/backup/$(date +%Y%m%d%H%M%S).tar \
      --exclude=Thumbnails --exclude=.thumbnails \
      /storage/.kodi /storage/.cache /storage/.config \
      /storage/.fluxbox /storage/.ssh
    find /storage/backup -name "*.tar" -type f -mtime +15 -exec rm -f {} \;

    This script deletes backups older than 15 days. I use something like this that runs automatically every 3 days before daily reboot on my device that runs 24/7. It has saved me from some disasters.

    The advantage of this method is that it is 100% compatible with the restoration of LibreELEC backups.

    Edited once, last by elonesna (June 19, 2021 at 7:40 PM).

  • You can also use the Restic program

    The program is available as a binary so it will work on various systems .... also via the network, e.g. to the NAS server

    Let me give an example of a backup of the /storage folder to some server on the network

    We download the prog. restic to our platform:

    Release restic 0.12.0 · restic/restic · GitHub

    We copy and give a short name (restic) to:

    /storage/restic

    we give executables:

    Code
    chmod +x /storage/restic

    For example, we create a repository on the server for saving the so-called snapshots e.g. in: /media/backup-kodi

    we issue the command in CE / LE / ssh:

    Code
    /storage/restic -r sftp:[email protected]:/media/backup-kodi init

    enter the password to the ssh server system + double the password to the encrypted repository being created

    We create a KODI backup, i.e. the folder: storage

    Code
    /storage/restic -r sftp:[email protected]:/media/backup-kodi  backup /storage

    Displaying the created snapshots:

    Code
    /storage/restic -r sftp:[email protected]:/media/backup-kodi snapshots

    subsequent backups are only incremental ...

    Backup restoration:

    Code
    /storage/restic -r sftp:[email protected]:/media/backup-kodi restore -t / e3440663

    note e3440663 is no. backup / snapshots also data such as: [email protected]: /media/backup-kodi ..... give your own :)

    exclusion of certain folders during backup ... eg recordings

    Code
    /storage/restic -r sftp:[email protected]:/media/veracrypt1/restic --iexclude /storage/recordings backup /storage

    Greetings!