Backup: Exclude folders configuration option

  • I have a serious problem with backup and cannot exclude recording folder or I just don't know how. So if this is possible somehow I would be more than happy to get the answer what file I need to change.

    I have currently over 2TB data in /storage/recordings from tvheadend recordings.

    Now if I run an backup of the kodi system this takes nearly a half day only for the backup and another half day for the restore. I guess the tar process is "too much" for the small atom CPU. While the backup is running I cannot use kodi. This is a not so funny situation.

    To resolve the issue I'd like to exclude the /storage/recordings folder from backup. This should help me creating a backup of all settings without recordings. I'm not sure if this problem also affects the tvshows and videos folders as these are empty on my system.

    Is there any workaround? I never tried to reconfigure tvheadend to use the tvshow folder. Not sure if this one is excluded. In github I have only found a backup restore script, but no backup script.

  • service.libreelec.settings/defaults.py at master · LibreELEC/service.libreelec.settings · GitHub

    ^ it should only be backing up /storage/.config /storage/.cache /storage/.xbmc and /storage/.ssh

    If you need to be more specific with backups you can always run your own "tar" archive command to include/exclude whatever locations you need using the "cron" scheduler. If you need to do fancy things like mount remote shares (to store the backup files on) first, schedule a script containing the command sequence instead of a single command.

    It should be a good Christmas project to read-up and learn a bit.

  • actually

    Quote

    XBMC_USER_HOME = os.environ.get('XBMC_USER_HOME', '/storage/.kodi')

    I have a lot of stuff that I don't want to backup in /storage/.kodi/addons , but I've got the point, just going to use custom script + cron to backup.

    p.s. I'm also trying to fix this bug, I was able to reproduce and confirm that it's a bug. Something wrong with get_folder_size() function. The function bumps self.total_backup_size to a really high number, in my case it's 140744620679740 which is about 140TB . Will create a PR with fix for this