• 1
  • 73
  • 74
  • 75(current)
  • 76
  • 77
  • 131
[Release] Backup (formerly XBMC Backup)
Even though you have all the addon files as required in the zip - it still has several dependencies that the addon needs to run. Normally Kodi tries to go out the internet and get these from the repo. If it can't you get the error you're seeing. These dependencies, as listed in the addon.xml file, are:

Code:
<requires>
    <import addon="xbmc.python" version="2.19.0"/>
    <import addon="script.module.httplib2" version="0.8.0" />
    <import addon="script.module.oauth2client" version="1.4.7" />
    <import addon="script.module.uritemplate" version="0.6" />
    <import addon="script.module.yaml" version="3.11"/>
    <import addon="script.module.googleapi" version="1.4.0" />
  </requires>

The xbmc.python one has to stay as that is the Kodi python lib; however the rest only apply for using Google Drive as a target. If you aren't planning on doing this, then just erase these from the addon.xml file if you really need this to install without internet.
Reply
That makes perfect sense now.
Reply
Thanks robweber,

I deleted the 5 lines, keeping only xbmc.python line.
Install was fine.

Now when I start Backup, I get the error message:
Backup error
See log

Part of the log is:
Code:
00:02:22 142.318115 T:1782576192  NOTICE: Previous line repeats 1 times.
00:02:22 142.318573 T:1782576192  NOTICE: Thread LanguageInvoker start, auto delete: false
00:02:23 143.766281 T:1782576192  NOTICE: -->Python Interpreter Initialized<--
00:02:25 145.895966 T:1782576192   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.ImportError'>
                                            Error Contents: No module named httplib2
                                            Traceback (most recent call last):
                                              File "/storage/.kodi/addons/xbmcbackup-master/default.py", line 4, in <module>
                                                from resources.lib.backup import XbmcBackup
                                              File "/storage/.kodi/addons/xbmcbackup-master/resources/lib/backup.py", line 7, in <module>
                                                from vfs import XBMCFileSystem,DropboxFileSystem,ZipFileSystem,GoogleDriveFilesystem
                                              File "/storage/.kodi/addons/xbmcbackup-master/resources/lib/vfs.py", line 9, in <module>
                                                from pydrive.auth import GoogleAuth
                                              File "/storage/.kodi/addons/xbmcbackup-master/resources/lib/pydrive/auth.py", line 3, in <module>
                                                import httplib2
                                            ImportError: No module named httplib2
                                            -->End of Python script error report<--
00:03:12 192.407257 T:1782576192  NOTICE: Thread BackgroundLoader start, auto delete: false
00:03:22 202.570541 T:1782576192  NOTICE: Thread LanguageInvoker start, auto delete: false

I'd guess you know what happen.
Config, video/audio player:
3T HDD <USB> Odroid N2+ / CoreElec <HDMI> Denon AVR-2313 <HDMI> LG TV 55UF860V
                                          <nfs wired> Linksys WRT32X router <USB> 4T HDD
Reply
Is there an easy way to add a line of code that reboots the system upon completion of a restore?
Reply
(2015-08-21, 17:42)MrNice Wrote: Thanks robweber,

I deleted the 5 lines, keeping only xbmc.python line.
Install was fine.

Now when I start Backup, I get the error message:
Backup error
See log

I suppose that's what I get for not testing what I recommended. I thought that libraries would only get called if you tried to use them. They are being loaded when the script runs regardless via import statements. In theory you could track down everywhere they are and remove them, but it will be a lot of check-test-try again on your end. If the addon ever changes and you want the new version you'd have to do it all over again.

An alternative would be to take a working install (on a computer that has the internet) and package the addon plus all the other dependencies an "offline" install. You'd have to copy over the dependencies first, then the Backup addon. I guess that is assuming they themselves don't have odd dependencies you'd then have to hunt down........

(2015-08-21, 18:46)mattmartinolc Wrote: Is there an easy way to add a line of code that reboots the system upon completion of a restore?

Is this something you'd want after a scheduled backup or every backup? I could change the settings for the scheduler to read "Post-Backup Action" and include Shutdown/Restart as an action there. If you're in a hurry just change line 73 of scheduler.py to read "Restart()" rather than shutdown. Again, this only applies to the scheduler.
Reply
(2015-08-21, 20:10)robweber Wrote:
(2015-08-21, 18:46)mattmartinolc Wrote: Is there an easy way to add a line of code that reboots the system upon completion of a restore?

Is this something you'd want after a scheduled backup or every backup? I could change the settings for the scheduler to read "Post-Backup Action" and include Shutdown/Restart as an action there. If you're in a hurry just change line 73 of scheduler.py to read "Restart()" rather than shutdown. Again, this only applies to the scheduler.

Thanks for the fast reply!

I don't use the scheduler - only manual backup / restore. Just need the quickest modification that will restart the system on completion. Smile
Reply
(2015-08-21, 20:10)robweber Wrote:
(2015-08-21, 17:42)MrNice Wrote: Thanks robweber,

I deleted the 5 lines, keeping only xbmc.python line.
Install was fine.

Now when I start Backup, I get the error message:
Backup error
See log

I suppose that's what I get for not testing what I recommended. I thought that libraries would only get called if you tried to use them. They are being loaded when the script runs regardless via import statements. In theory you could track down everywhere they are and remove them, but it will be a lot of check-test-try again on your end. If the addon ever changes and you want the new version you'd have to do it all over again.

An alternative would be to take a working install (on a computer that has the internet) and package the addon plus all the other dependencies an "offline" install. You'd have to copy over the dependencies first, then the Backup addon. I guess that is assuming they themselves don't have odd dependencies you'd then have to hunt down........

(2015-08-21, 18:46)mattmartinolc Wrote: Is there an easy way to add a line of code that reboots the system upon completion of a restore?

Is this something you'd want after a scheduled backup or every backup? I could change the settings for the scheduler to read "Post-Backup Action" and include Shutdown/Restart as an action there. If you're in a hurry just change line 73 of scheduler.py to read "Restart()" rather than shutdown. Again, this only applies to the scheduler.
The objective was to restore the wifi settings in a new install to get network.
In fact Backup doesn't save the file /storage/.cache/connman/wifi_xxxxxx_managed_psk
So I did it manually, copied it from working install to a usb HDD and another copy to the new install with file manager (hidden files activated) and I got the connexion.
From that I installed Backup from Internet and did a restore.

Thanks for your help
Config, video/audio player:
3T HDD <USB> Odroid N2+ / CoreElec <HDMI> Denon AVR-2313 <HDMI> LG TV 55UF860V
                                          <nfs wired> Linksys WRT32X router <USB> 4T HDD
Reply
Does this backup process also restore Shortcuts, I assume not as I guess it depends of the skin you are using, but I'd figure I'd ask
Reply
It will as long as you perform a forced shutdown of kodi. On media type boxes the easiest way is to just pull the power to the box when the restore has finished without doing anything else.
Reply
(2015-08-21, 20:10)robweber Wrote:
(2015-08-21, 18:46)mattmartinolc Wrote: Is there an easy way to add a line of code that reboots the system upon completion of a restore?

Is this something you'd want after a scheduled backup or every backup? I could change the settings for the scheduler to read "Post-Backup Action" and include Shutdown/Restart as an action there. If you're in a hurry just change line 73 of scheduler.py to read "Restart()" rather than shutdown. Again, this only applies to the scheduler.

Would I be able to put "xbmc.executebuiltin('Restart()')" in the code somewhere to reboot after a manual (unscheduled) restore?
Reply
(2015-08-23, 23:11)mattmartinolc Wrote:
(2015-08-21, 20:10)robweber Wrote:
(2015-08-21, 18:46)mattmartinolc Wrote: Is there an easy way to add a line of code that reboots the system upon completion of a restore?

Is this something you'd want after a scheduled backup or every backup? I could change the settings for the scheduler to read "Post-Backup Action" and include Shutdown/Restart as an action there. If you're in a hurry just change line 73 of scheduler.py to read "Restart()" rather than shutdown. Again, this only applies to the scheduler.

Would I be able to put "xbmc.executebuiltin('Restart()')" in the code somewhere to reboot after a manual (unscheduled) restore?

Yes, in the default.py file add that command on a new line immediately after line 73. You'll also want to add "import xbmc" at the top. I'm assuming you know a little about python to get the formatting right.
Reply
(2015-08-24, 22:23)robweber Wrote:
(2015-08-23, 23:11)mattmartinolc Wrote:
(2015-08-21, 20:10)robweber Wrote: Is this something you'd want after a scheduled backup or every backup? I could change the settings for the scheduler to read "Post-Backup Action" and include Shutdown/Restart as an action there. If you're in a hurry just change line 73 of scheduler.py to read "Restart()" rather than shutdown. Again, this only applies to the scheduler.

Would I be able to put "xbmc.executebuiltin('Restart()')" in the code somewhere to reboot after a manual (unscheduled) restore?

Yes, in the default.py file add that command on a new line immediately after line 73. You'll also want to add "import xbmc" at the top. I'm assuming you know a little about python to get the formatting right.

Added the code, started a backup - failed at 32%
Reply
Just to confirm - the backup finished before you did this right?

Adding that one line doesn't affect the backup running. That code shouldn't execute until the backup process completely exits.
Reply
(2015-08-25, 22:40)robweber Wrote: Just to confirm - the backup finished before you did this right?

Adding that one line doesn't affect the backup running. That code shouldn't execute until the backup process completely exits.

With the lines of code in there, it fails at 32% while its on /addons/packages and no archive file appears.

as you instructed, I put at the very top of the code

import xbmc

and after line 73 it's

xbmc.executebuiltin('Restart()')
Reply
Thanks for all your help man. I am using your application unconventionally so it's been a bit of a learning curve for me making modifications to it. I am actually using it as an updater for media boxes. I make an archive of any changes or updates, then upload to a server, and then the users click update front their front menu and it goes straight to the restore function without them seeing backup/restore option, skipping over the first screen.

I tried again taking import xbmc off the top leaving the restart command in, and it fails again but at 99% this time.
Reply
  • 1
  • 73
  • 74
  • 75(current)
  • 76
  • 77
  • 131

Logout Mark Read Team Forum Stats Members Help
[Release] Backup (formerly XBMC Backup)10