Scheduled backups

  • Would it be possible to include a feature for scheduling backups - weekly, monthly etc?

    I was thinking of a situation where a script could be invoked by a cron which in turn runs the backup to the default backup directory.

    Thanks.

  • no they do not work the same. the LibreELEC backup saves LibreELEC specific things (ssh keys, LibreELEC settings, etc)

    Thanks - I will stick with a manual LibreElec backup in that case, on the basis it offers a complete system restore should the need arise.


  • no they do not work the same. the LibreELEC backup saves LibreELEC specific things (ssh keys, LibreELEC settings, etc)

    Hi,
    Could you add /storage/.profile to the backup and restore list please ?

    Edit: I added

    Code
    if os.path.exists("/storage/.profile"):
                        tar.add("/storage/.profile")


    After line 903 in service.libreelec.settings/resources/lib/modules/system.py and it did the trick.

    Edited once, last by ozolli (November 24, 2016 at 11:52 PM).


  • Currently a LibreElec backup is just a tar of /storage/.cache, /storage/.config, /storage/.kodi and /storage/.ssh

    So how complete would a restore be after for example burning a new LE image as a completely new install.


  • Hi,
    Could you add /storage/.profile to the backup and restore list please ?

    Edit: I added

    Code
    if os.path.exists("/storage/.profile"):
                        tar.add("/storage/.profile")


    After line 903 in service.libreelec.settings/resources/lib/modules/system.py and it did the trick.

    Actually I found a way to have a .profile file surviving a backup/restore using a dummy addon.
    At startup LE looks for /storage/.kodi/addons/*/profile.d/*.profile (in /etc/profile.d/00-addons.conf).
    So the content of, for example, /storage/.kodi/addons/user/profile.d/user.profile will be read and applied, and this file will be saved and restored.

    Worth noting that /storage/.kodi/addons/user/bin will be added to the PATH variable at startup so is a nice place for your own scripts.

    Sort of a dirty hack but I'm fine with it ;)