Kodi Community Forum
[Release] Backup (formerly XBMC Backup) - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Program Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=151)
+---- Thread: [Release] Backup (formerly XBMC Backup) (/showthread.php?tid=129499)



RE: [Release] Backup (formerly XBMC Backup) - CiNcH - 2019-12-22

Quote:You can install version 1.6.0 from the releases page though. This contains the Dropbox code embedded with the addon code. In order to be accepted to the Kodi repo I had to strip this out into it's own addon so until the Dropbox lib is in the Matrix repo I can't push and updated version for general use. Hope this helps.

Installs fine now. But when trying to restore from a backup, I still get an error.

txt:

2019-12-22 17:43:16.524 T:26187   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <class 'KeyError'>
                                            Error Contents: 'directories'
                                            Traceback (most recent call last):
                                              File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.xbmcbackup/default.py", line 92, in <module>
                                                backup.restore()
                                              File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.xbmcbackup/resources/lib/backup.py", line 282, in restore
                                                restoreSets = [n['name'] for n in valFile['directories']]
                                            KeyError: 'directories'
                                            -->End of Python script error report<--

Didn't try to create a backup til now.

Looks like the whole Py3 is in very early stages. Hardly anything works properly on Android TV.


RE: [Release] Backup (formerly XBMC Backup) - gilsonsjc - 2019-12-23

Hi,

  My system: Latest Kodi 18.5 running all default skin on NVidia Shield 2017 running the latest official software updates to date
 
  After setting the backup add-on to backup everything, running the backup successfully, uninstalling Kodi and installing it again, installing the backup add-on and running the restore I noticed that several settings have not came back as they were at the time of the backup. Some of them are:
  •    Settings/Player/Video - Adjust display refresh rate 
  •    Settings/Player/Language - the whole "Subtitles" and "Download services" sections
  •    Settings/System/Audio
    • Number of channels
    • "GUI Sounds" section
    • "Audio Passthrough" section
  • Settings/Interface/Skin/Configure Skin/Main menu items selection
  • Settings/Services/Weather 
   Would you please check on these items? Thank you!
Gilson


RE: [Release] Backup (formerly XBMC Backup) - robweber - 2019-12-23

@CiNcH

I would agree that Py3 addons are in the early stages. There are only a few in the official repo and many authors are trying to make their addons compatible at the moment. Regarding the error you are seeing, are you trying to read backup files created in a version previous to 1.5.0? There is a compatibility issue starting with that version where any backup made previous to that will not be read. That would be the source of the error you're seeing. 

@gilsonsjc

What version of Kodi and what version of the Backup addon are you using. I believe it was in Krypton but at some point the format of the Guisettings.xml file changed from using tags like this:

Code:
<setting>value</setting>
To This
<setting id="key">value</setting>

Because of this guisettings are not restored properly (like the ones you mention) in some versions of the addon. This was fixed in Version 1.5.1. Unfortunately I can't update this in the current repo for kind of an odd timing reason. The most current version of the Backup addon exists in the Jarvis repo, so it is available in Krypton and Leia (backwards compatibility). The Kodi team is no longer accepting "new" submission to the Krypton addon branch. I can't just push a fix for Krypton+ specifically because I can only update the Jarvis branch, which would break this functionality in that version where the guisettings file was using the old syntax.


RE: [Release] Backup (formerly XBMC Backup) - gilsonsjc - 2019-12-23

(2019-12-23, 16:33)robweber Wrote: @gilsonsjc

What version of Kodi and what version of the Backup addon are you using. I believe it was in Krypton but at some point the format of the Guisettings.xml file changed from using tags like this:

Code:
<setting>value</setting>
To This
<setting id="key">value</setting>

Because of this guisettings are not restored properly (like the ones you mention) in some versions of the addon. This was fixed in Version 1.5.1. Unfortunately I can't update this in the current repo for kind of an odd timing reason. The most current version of the Backup addon exists in the Jarvis repo, so it is available in Krypton and Leia (backwards compatibility). The Kodi team is no longer accepting "new" submission to the Krypton addon branch. I can't just push a fix for Krypton+ specifically because I can only update the Jarvis branch, which would break this functionality in that version where the guisettings file was using the old syntax.
I am using Kodi version 18.5 and backup add-on 1.1.3. How can I install the 1.5.1 so that I can test? Thanks.


RE: [Release] Backup (formerly XBMC Backup) - gilsonsjc - 2019-12-24

(2019-12-23, 21:28)gilsonsjc Wrote:
(2019-12-23, 16:33)robweber Wrote: @gilsonsjc

What version of Kodi and what version of the Backup addon are you using. I believe it was in Krypton but at some point the format of the Guisettings.xml file changed from using tags like this:

Code:
<setting>value</setting>
To This
<setting id="key">value</setting>

Because of this guisettings are not restored properly (like the ones you mention) in some versions of the addon. This was fixed in Version 1.5.1. Unfortunately I can't update this in the current repo for kind of an odd timing reason. The most current version of the Backup addon exists in the Jarvis repo, so it is available in Krypton and Leia (backwards compatibility). The Kodi team is no longer accepting "new" submission to the Krypton addon branch. I can't just push a fix for Krypton+ specifically because I can only update the Jarvis branch, which would break this functionality in that version where the guisettings file was using the old syntax.
I am using Kodi version 18.5 and backup add-on 1.1.3. How can I install the 1.5.1 so that I can test? Thanks. 
@robweber - here is what I've done
  1. Downloaded the version 1.5.1 zip file from Github and installed it in Kodi 18.5 (latest oficial version)
  2. Ticket every settings again - I left unchecked only the options Thumbnails/Fun Arts and Game Saves
  3. Ran the backup and save it on a NFS share on my network
  4. Force Kodi stop, cleaned cache, deleted data, uninstalled and installed Kodi 18.5 from Google Play again
  5. Installed the backup 1.5.1 from the zip file in Kodi
  6. Set up the backup add-on with the NFS path where my backup was
  7. Ran restore
  8. Restart Kodi
     On step 7 the restore got stuck in the very end for almost a hour on a message that reads "Clean up operations ...." - that message only appeared after the restore reached to the 100% on the progress bar.

     There were still some settings that were not properly backed up (or restored). They are:
  • My settings came back on Standard level instead of Expert
  • Settings/Interface/Skin/Configure Skin/Main menu items selections were not ok
  • Settings/Player/Language/Download services/Languages to download subtitles for - it showed only one out of the three languages I had there before
  • On video playing: Settings/Video Settings/View Mode - I had it set to "Strech 16:9" as default for all videos but it came back as "Normal"
  Would you please check? And is there any way I can install the latest back up add-on version without having to download zip files (like adding another repo)? Thank you!


RE: [Release] Backup (formerly XBMC Backup) - Skirge01 - 2019-12-27

Rob,

I'm running 1.5.2 and just tried to do a restore on Kodi 17.6 MVC build.  I thought that this version included a fix so that we could restore directly from large zip files.  Obviously, I'm asking because it didn't work when I gave it a try.  As in the past, it did work fine after I extracted them to a folder.  Let me know what info you need if you want to look into this; no big deal if you don't.

Also, when I went to restore, I instinctively selected to restore every option listed.  However, I don't use profiles, so that folder was never created in the backup and the restore threw up an error about the missing profiles, then failed to actually restore.  I'm wondering if you think it might make sense to handle this a bit differently.  Two alternatives come to mind.  Alternative #1: Notify the user about the missing profiles (as it currently does), but ask if they want to restore anyway, which is what I would have done.  Alternative #2: Since we first have to select the backup file to restore, what about some code to check what was actually backed up and only present those options to the user?  Maybe it could even gray them out with a "(none found)" after the option?  I have no clue what's possible from a Kodi standpoint, so these may not be at all feasible.  Just some thoughts.

Hope you enjoyed the holidays!


Kodi Backup Add-on Issues with Directory to Save Backups - themusj - 2019-12-30

Hours later . . . I could not get SMB to work, nor any of the other options, including the USB stick I spend an hour on before Kodi recognized it and my TV. But even though Kodi Backup would see it, it wouldn't write anything to it. And SMB, I tried for hours today to get it to see my Mycloud device with a shared folder. Now on my Windows PC, I could get there, but not on my Android devices.

I finally had to save the backup directly to the limited storage space on my TV. I understand a new version is  coming out, but it requires Python 3, which I understand will not work with Kodi 18.

Am I the only one who has had a mountain to climb with this add-on. It is greatly of value, but getting the place to store the backup and then see it to restore it has been quite a challenge.


RE: Kodi Backup Add-on Issues with Directory to Save Backups - themusj - 2019-12-30

(2019-12-30, 01:39)themusj Wrote: Hours later . . . I could not get SMB to work, nor any of the other options, including the USB stick I spend an hour on before Kodi recognized it and my TV. But even though Kodi Backup would see it, it wouldn't write anything to it. And SMB, I tried for hours today to get it to see my Mycloud device with a shared folder. Now on my Windows PC, I could get there, but not on my Android devices.

I finally had to save the backup directly to the limited storage space on my TV. I understand a new version is  coming out, but it requires Python 3, which I understand will not work with Kodi 18.

Am I the only one who has had a mountain to climb with this add-on. It is greatly of value, but getting the place to store the backup and then see it to restore it has been quite a challenge.

Indeed, just found out my TV is out of disk space making it another challenge to get that backup in a location accessible to the restore feature.


RE: Kodi Backup Add-on Issues with Directory to Save Backups - themusj - 2019-12-30

(2019-12-30, 01:46)themusj Wrote:
(2019-12-30, 01:39)themusj Wrote: Hours later . . . I could not get SMB to work, nor any of the other options, including the USB stick I spend an hour on before Kodi recognized it and my TV. But even though Kodi Backup would see it, it wouldn't write anything to it. And SMB, I tried for hours today to get it to see my Mycloud device with a shared folder. Now on my Windows PC, I could get there, but not on my Android devices.

I finally had to save the backup directly to the limited storage space on my TV. I understand a new version is  coming out, but it requires Python 3, which I understand will not work with Kodi 18.

Am I the only one who has had a mountain to climb with this add-on. It is greatly of value, but getting the place to store the backup and then see it to restore it has been quite a challenge.

Indeed, just found out my TV is out of disk space making it another challenge to get that backup in a location accessible to the restore feature. 
Fun gets funner. My Kodi I backed up on my TV crashed and I did a restore with my backup. But too my surprise the many of my settings are gone despite checking everything  but profile. My main menu is very different like factory settings and my video locations are not correct. Where did I go wrong?


RE: Kodi Backup Add-on Issues with Directory to Save Backups - themusj - 2019-12-30

(2019-12-30, 04:11)themusj Wrote:
(2019-12-30, 01:46)themusj Wrote:
(2019-12-30, 01:39)themusj Wrote: Hours later . . . I could not get SMB to work, nor any of the other options, including the USB stick I spend an hour on before Kodi recognized it and my TV. But even though Kodi Backup would see it, it wouldn't write anything to it. And SMB, I tried for hours today to get it to see my Mycloud device with a shared folder. Now on my Windows PC, I could get there, but not on my Android devices.

I finally had to save the backup directly to the limited storage space on my TV. I understand a new version is  coming out, but it requires Python 3, which I understand will not work with Kodi 18.

Am I the only one who has had a mountain to climb with this add-on. It is greatly of value, but getting the place to store the backup and then see it to restore it has been quite a challenge.

Indeed, just found out my TV is out of disk space making it another challenge to get that backup in a location accessible to the restore feature.  
Fun gets funner. My Kodi I backed up on my TV crashed and I did a restore with my backup. But too my surprise the many of my settings are gone despite checking everything  but profile. My main menu is very different like factory settings and my video locations are not correct. Where did I go wrong? 
If I backup my android tablet to my TV, will it restore my missing settings. My whole interface is messed up now. The video path locations are missing, not sure how they are even working. The personal settings I made are all gone. So much for a successful backup. I guess if it isn't broke, don't fix it.


RE: [Release] Backup (formerly XBMC Backup) - DarrenHill - 2019-12-30

@themusj - I've merged your issue thread into the main one for the backup addon.

Just to keep things tidy and so that your problem gets the attention of the correct people.


RE: [Release] Backup (formerly XBMC Backup) - themusj - 2019-12-30

(2019-12-30, 11:22)DarrenHill Wrote: @themusj - I've merged your issue thread into the main one for the backup addon.

Just to keep things tidy and so that your problem gets the attention of the correct people.

Thank you. 

I am really hurting now. After all of the above where the backup failed me, I have removed and re-installed Kodi several times. But none of my Zip files will install due to dependencies errors. And this is a clean install. I didn't have this problem before. I have unknown sources enabled. First time in my life, a backup system caused more headache than doing nothing. :-( I at ground zero.


RE: [Release] Backup (formerly XBMC Backup) - themusj - 2019-12-30

(2019-12-30, 15:38)themusj Wrote:
(2019-12-30, 11:22)DarrenHill Wrote: @themusj - I've merged your issue thread into the main one for the backup addon.

Just to keep things tidy and so that your problem gets the attention of the correct people.

Thank you. 

I am really hurting now. After all of the above where the backup failed me, I have removed and re-installed Kodi several times. But none of my Zip files will install due to dependencies errors. And this is a clean install. I didn't have this problem before. I have unknown sources enabled. First time in my life, a backup system caused more headache than doing nothing. :-( I at ground zero. 

Resolved

Here is how. I opted to remove, reboot TV, re-install Kodi on my TV. I then did a Kodi backup from my Android tablet [without the thumbnails which added a huge amount of time to the backup.] Then I accessed that NFS share once I installed Backup Add-on. {It gave me again dependencies errors even with a new install, but I was able to under dependencies install them one at a time.} I then found the NFS share. Ran the restore. Then when I saw a glimmer of hope, I re-installed the skin. Apparently the skin does not come over during backup. The files are there, but you have to re-apply it.

I hope this helps someone else who may accidentally travel down this road.


RE: [Release] Backup (formerly XBMC Backup) - DarrenHill - 2019-12-30

Removed due to the above post Wink

If you restore addons (or install them in any other way than via the normal browser mechanism) they will be disabled by default (as a security measure). As you note you will need to go in and manually enable them for them to function.


RE: [Release] Backup (formerly XBMC Backup) - robweber - 2019-12-30

@gilsonsjc 
Quote:There were still some settings that were not properly backed up (or restored). They are:
My settings came back on Standard level instead of Expert
Settings/Interface/Skin/Configure Skin/Main menu items selections were not ok
Settings/Player/Language/Download services/Languages to download subtitles for - it showed only one out of the three languages I had there before
On video playing: Settings/Video Settings/View Mode - I had it set to "Strech 16:9" as default for all videos but it came back as "Normal"
Would you please check? And is there any way I can install the latest back up add-on version without having to download zip files (like adding another repo)? Thank you!
Thanks for following up on your progress. I'm not sure where the toggle for "standard" vs "expert" is actually stored within Kodi so I don't know if that particular setting will come back. Anyone with more knowledge on this feel free to chime in here. 
Right now the only settings type items you can get restored are things that are part of the guisettings.xml file - that also exist as part of the JSON Settings.GetSettings() and SettingsSetSettingValue() functions. 
Skin configurations are actually stored with the addon, so if you restore the addon_data folder, reactivate the skin (if not default) and restart Kodi they should come back. This addon cannot set them for you. I realize some of these items are a pain but that is just a by product of the module nature of Kodi. I've had issues in the past restoring specific skins where they use "helper" addons that in turn have their own settings. Just a matter of getting the right addon_data in the right spot. 
The video stretch setting should have come over, not sure why it didn't. If you do a restore in debug mode there is a log entry for every updated setting. The way these are calculated is to compare the Kodi defaults to what you have in your restore files. Where they differ the setting is changed. This would tell you exactly what was changed, it will be at the very end of a restore operation. 
There is not a place where this addon is stored outside of the main Kodi repo (at least that I know of, possible it's being replicated to 3rd party repos from GitHub I'm not aware of). When Matrix lands there will be an updated version included in the Matrix Python3 repo. Honestly the issue with versions at the moment has to do with missed windows for when addons in different branches can be updated and I just missed the cutoff, more my problem than anyone else's really. Hope some of this helps. 

@Skirge01 
Quote:Also, when I went to restore, I instinctively selected to restore every option listed.  However, I don't use profiles, so that folder was never created in the backup and the restore threw up an error about the missing profiles, then failed to actually restore.  I'm wondering if you think it might make sense to handle this a bit differently.  Two alternatives come to mind.  Alternative #1: Notify the user about the missing profiles (as it currently does), but ask if they want to restore anyway, which is what I would have done.  Alternative #2: Since we first have to select the backup file to restore, what about some code to check what was actually backed up and only present those options to the user?  Maybe it could even gray them out with a "(none found)" after the option?  I have no clue what's possible from a Kodi standpoint, so these may not be at all feasible.  Just some thoughts.
  
Thanks for the feedback. In the latest versions of this addon (1.5.0 +) what you're suggested is exactly how things will work. When restoring you get a list of folders that actually exist as part of the restore, and then you can select from those options. If you've changed your backup settings between backups (say you only do a full "addons" backup once a month or something) you'll only get presented with folders that exist in the archive you've selected to restore. This should eliminate any confusion. Download the newest from GitHub, keep in mind you'll need this version for Krypton or Leia and this version for Matrix

@themusj 

Sorry you had so many issues getting your Backups to both take a backup and then a restore. Reading through your posts it seems a lot of your initial problems are due to permissions issues trying to write to either flash storage or your network storage device. After that getting your settings to work properly after a restore also seemed to be an issue. Without knowing the version of Kodi you're running and the version of this addon you're using I can't speculate too much on exactly where your problems may lie. Common issues are write permissions for the Kodi process (this is very common on Android where write permissions sometimes need to be explicitly given per app) and issues with guisettings restores. Often these can be fixed by renaming the guisettings.xml.restored file while Kodi is not running. 

Glad you got things work. The skin refresh you mention is a key piece since skin settings are stored in the addon_data folder. Just going to the default skin and back, or restarting Kodi can sometimes get these to be read properly. Any specific questions let me know.