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] XBMC Backup - McButton - 2014-11-18

...delete...reinstall? Save to a different location?


RE: [Release] XBMC Backup - 03397 - 2014-11-18

(2014-11-18, 20:20)McButton Wrote: ...delete...reinstall? Save to a different location?



I have delete and reinstall.
I will try to save to a different location


RE: [Release] XBMC Backup - 03397 - 2014-11-19

I have deleted it and change to different location.
I am getting the same message.


RE: [Release] XBMC Backup - larryralph - 2014-11-20

I'm sure it's just me, but...

I've installed this backup utility.

When I run it, I get a Script failed message.
In the log I see an "operation not permitted" error referencing file RssFeeds.xml
When I look in my backup folder I see one file RssFeeds.xml, size is .53 KB
The contents look like a valid xml file.

There's plenty of room.
I am able to create and edit a file in the backup directory.

Any ideas on what else I can check?

Thanks.

Whoops, should mention I am running the latest Kodi beta 3.


RE: [Release] XBMC Backup - robweber - 2014-11-20

(2014-11-16, 09:47)jenoyend Wrote: Do you know if there are some xbmc function able to do this:
os.path.basename
os.path.join

At worst I can still manipulate string. It would allow me to not import anymore os shutil and subprocess. Blush

Edit:
With this function: xbmcvfs.copy(source, destination) if the file already exits at destination place, will it overwrite it?

I would like to import xbmc and xbmccvfs when I use putty to test some functions. How can I do it?

Thanks for the support.

I do not think there are any functions in the xbmcvfs module that will do either the basename or join. Would be kind of nice though - especially since it would be cross platform with the xbmc filesystem.

I do believe the copy function will write over existing files. I remember before the xbmc backup addon made different subdirectories for each backup I counted on this fact to make sure files were updated.

You can't just import the xbmc or xbmcvfs modules into a python script to test things out (unfortunately). They only exist as wrappers to C functions that get executed when XBMC is running. You could use the ExecuteScript() function you mention to write things and then test them within XBMC while it is running. I also highly recommend the XBMCStubs project (https://github.com/romanvm/xbmcstubs) you can use this to at least add stub support for your dev enviroment to make sure you are getting the method calls and arguments right.

(2014-11-18, 19:44)03397 Wrote: I am using XBMC Backup on gotham 13.2 and I am getting unsuccesful results

19:38:01 T:884 NOTICE: script.xbmcbackup-0.5.8.7: Starting
19:38:01 T:884 NOTICE: script.xbmcbackup-0.5.8.7: Local Dir: C:/Users/nicolas/AppData/Roaming/XBMC/
19:38:01 T:884 NOTICE: script.xbmcbackup-0.5.8.7: Remote Dir: 201411181938/
19:38:01 T:884 NOTICE: script.xbmcbackup-0.5.8.7: Mode - Backup
19:38:01 T:884 NOTICE: script.xbmcbackup-0.5.8.7: Creating Files List
19:38:06 T:884 NOTICE: script.xbmcbackup-0.5.8.7: Writing files to: 201411181938/
19:38:06 T:884 NOTICE: script.xbmcbackup-0.5.8.7: Source: C:/Users/nicolas/AppData/Roaming/XBMC/
19:40:44 T:884 NOTICE: script.xbmcbackup-0.5.8.7: Writing files to: 201411181938/custom_31ced47c/
19:40:44 T:884 NOTICE: script.xbmcbackup-0.5.8.7: Source: C:/Users/nicolas/AppData/Roaming/XBMC/
19:40:55 T:884 ERROR: EXCEPTION: Unknown exception thrown from the call "read"
19:40:55 T:884 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.RuntimeError'>
Error Contents: Unknown exception thrown from the call "read"
Traceback (most recent call last):
File "C:\Users\nicolas\AppData\Roaming\XBMC\addons\script.xbmcbackup\default.py", line 69, in <module>
backup.run(mode)
File "C:\Users\nicolas\AppData\Roaming\XBMC\addons\script.xbmcbackup\resources\lib\backup.py", line 248, in run
filesCopied = self.backupFiles(fileGroup['files'],self.xbmc_vfs,self.remote_vfs)
File "C:\Users\nicolas\AppData\Roaming\XBMC\addons\script.xbmcbackup\resources\lib\backup.py", line 461, in backupFiles
wroteFile = dest.put(aFile,dest.root_path + aFile[len(source.root_path):])
File "C:\Users\nicolas\AppData\Roaming\XBMC\addons\script.xbmcbackup\resources\lib\vfs.py", line 100, in put
self.zip.writestr(utils.encode(dest),aFile.read(),compress_type=zipfile.ZIP_DEFLATED)
RuntimeError: Unknown exception thrown from the call "read"
-->End of Python script error report<--

This used to work but not anymore. I am making the backup to a network drive.

The error you are seeing is part of the compression part of the addon when attempting to add a file to the archive. It looks like you have a custom directory setup, and since you say this used to work I'm guessing a file was added to this directory that it doesn't like. Hard to get too much information here as the actual error is being thrown by the aFile.read() method, which is the read method of the xbmcvfs.File class. If you run the addon with debug logging turned on you may at least get the name of the file that is causing problems as the addon will log each file as it gets processed. Please post anything to http://pastebin.com/ as it will be a pretty long file.

(2014-11-20, 18:04)larryralph Wrote: I'm sure it's just me, but...

I've installed this backup utility.

When I run it, I get a Script failed message.
In the log I see an "operation not permitted" error referencing file RssFeeds.xml
When I look in my backup folder I see one file RssFeeds.xml, size is .53 KB
The contents look like a valid xml file.

There's plenty of room.
I am able to create and edit a file in the backup directory.

Any ideas on what else I can check?

Thanks.

Whoops, should mention I am running the latest Kodi beta 3.

I have not tested this addon on Kodi myself so I have no idea if it could be related to that - maybe(?). That being said it sure sounds like a permissions issue on that file. If you can try running the addon with debug logging enabled. Post any results to http://pastebin.com/.


RE: [Release] XBMC Backup - 03397 - 2014-11-20

(2014-11-20, 19:08)robweber Wrote:
(2014-11-16, 09:47)jenoyend Wrote: Do you know if there are some xbmc function able to do this:
os.path.basename
os.path.join

At worst I can still manipulate string. It would allow me to not import anymore os shutil and subprocess. Blush

Edit:
With this function: xbmcvfs.copy(source, destination) if the file already exits at destination place, will it overwrite it?

I would like to import xbmc and xbmccvfs when I use putty to test some functions. How can I do it?

Thanks for the support.

I do not think there are any functions in the xbmcvfs module that will do either the basename or join. Would be kind of nice though - especially since it would be cross platform with the xbmc filesystem.

I do believe the copy function will write over existing files. I remember before the xbmc backup addon made different subdirectories for each backup I counted on this fact to make sure files were updated.

You can't just import the xbmc or xbmcvfs modules into a python script to test things out (unfortunately). They only exist as wrappers to C functions that get executed when XBMC is running. You could use the ExecuteScript() function you mention to write things and then test them within XBMC while it is running. I also highly recommend the XBMCStubs project (https://github.com/romanvm/xbmcstubs) you can use this to at least add stub support for your dev enviroment to make sure you are getting the method calls and arguments right.

(2014-11-18, 19:44)03397 Wrote: I am using XBMC Backup on gotham 13.2 and I am getting unsuccesful results

19:38:01 T:884 NOTICE: script.xbmcbackup-0.5.8.7: Starting
19:38:01 T:884 NOTICE: script.xbmcbackup-0.5.8.7: Local Dir: C:/Users/nicolas/AppData/Roaming/XBMC/
19:38:01 T:884 NOTICE: script.xbmcbackup-0.5.8.7: Remote Dir: 201411181938/
19:38:01 T:884 NOTICE: script.xbmcbackup-0.5.8.7: Mode - Backup
19:38:01 T:884 NOTICE: script.xbmcbackup-0.5.8.7: Creating Files List
19:38:06 T:884 NOTICE: script.xbmcbackup-0.5.8.7: Writing files to: 201411181938/
19:38:06 T:884 NOTICE: script.xbmcbackup-0.5.8.7: Source: C:/Users/nicolas/AppData/Roaming/XBMC/
19:40:44 T:884 NOTICE: script.xbmcbackup-0.5.8.7: Writing files to: 201411181938/custom_31ced47c/
19:40:44 T:884 NOTICE: script.xbmcbackup-0.5.8.7: Source: C:/Users/nicolas/AppData/Roaming/XBMC/
19:40:55 T:884 ERROR: EXCEPTION: Unknown exception thrown from the call "read"
19:40:55 T:884 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.RuntimeError'>
Error Contents: Unknown exception thrown from the call "read"
Traceback (most recent call last):
File "C:\Users\nicolas\AppData\Roaming\XBMC\addons\script.xbmcbackup\default.py", line 69, in <module>
backup.run(mode)
File "C:\Users\nicolas\AppData\Roaming\XBMC\addons\script.xbmcbackup\resources\lib\backup.py", line 248, in run
filesCopied = self.backupFiles(fileGroup['files'],self.xbmc_vfs,self.remote_vfs)
File "C:\Users\nicolas\AppData\Roaming\XBMC\addons\script.xbmcbackup\resources\lib\backup.py", line 461, in backupFiles
wroteFile = dest.put(aFile,dest.root_path + aFile[len(source.root_path):])
File "C:\Users\nicolas\AppData\Roaming\XBMC\addons\script.xbmcbackup\resources\lib\vfs.py", line 100, in put
self.zip.writestr(utils.encode(dest),aFile.read(),compress_type=zipfile.ZIP_DEFLATED)
RuntimeError: Unknown exception thrown from the call "read"
-->End of Python script error report<--

This used to work but not anymore. I am making the backup to a network drive.

The error you are seeing is part of the compression part of the addon when attempting to add a file to the archive. It looks like you have a custom directory setup, and since you say this used to work I'm guessing a file was added to this directory that it doesn't like. Hard to get too much information here as the actual error is being thrown by the aFile.read() method, which is the read method of the xbmcvfs.File class. If you run the addon with debug logging turned on you may at least get the name of the file that is causing problems as the addon will log each file as it gets processed. Please post anything to http://pastebin.com/ as it will be a pretty long file.

(2014-11-20, 18:04)larryralph Wrote: I'm sure it's just me, but...

I've installed this backup utility.

When I run it, I get a Script failed message.
In the log I see an "operation not permitted" error referencing file RssFeeds.xml
When I look in my backup folder I see one file RssFeeds.xml, size is .53 KB
The contents look like a valid xml file.

There's plenty of room.
I am able to create and edit a file in the backup directory.

Any ideas on what else I can check?

Thanks.

Whoops, should mention I am running the latest Kodi beta 3.

I have not tested this addon on Kodi myself so I have no idea if it could be related to that - maybe(?). That being said it sure sounds like a permissions issue on that file. If you can try running the addon with debug logging enabled. Post any results to http://pastebin.com/.


I have enabled the debugger.
It seems that it crashes when tries to backup itself??

19:43:27 T:3148 DEBUG: script.xbmcbackup-0.5.8.7: Writing file: C:/Users/nicolas/AppData/Roaming/XBMC//cache/76486db099.720.en.srt
19:43:27 T:3148 DEBUG: script.xbmcbackup-0.5.8.7: Writing file: C:/Users/nicolas/AppData/Roaming/XBMC//cache/8df164c8d3.720.en.srt
19:43:27 T:3148 DEBUG: script.xbmcbackup-0.5.8.7: Writing file: C:/Users/nicolas/AppData/Roaming/XBMC//cache/changelog-1.0.10.txt
19:43:27 T:3148 DEBUG: script.xbmcbackup-0.5.8.7: Writing file: C:/Users/nicolas/AppData/Roaming/XBMC//cache/changelog-2.0.2.txt
19:43:27 T:3148 DEBUG: script.xbmcbackup-0.5.8.7: Writing file: C:/Users/nicolas/AppData/Roaming/XBMC//cache/changelog.txt
19:43:27 T:3148 DEBUG: script.xbmcbackup-0.5.8.7: Writing file: C:/Users/nicolas/AppData/Roaming/XBMC//cache/commoncache.db
19:43:27 T:3148 DEBUG: script.xbmcbackup-0.5.8.7: Writing file: C:/Users/nicolas/AppData/Roaming/XBMC//cache/cookies.dat
19:43:27 T:3148 DEBUG: script.xbmcbackup-0.5.8.7: Writing file: C:/Users/nicolas/AppData/Roaming/XBMC//cache/ecd2b723ae.720.en.srt
19:43:27 T:3148 DEBUG: script.xbmcbackup-0.5.8.7: Writing file: C:/Users/nicolas/AppData/Roaming/XBMC//cache/f964bda855.720.en.srt
19:43:27 T:3148 DEBUG: script.xbmcbackup-0.5.8.7: Writing file: C:/Users/nicolas/AppData/Roaming/XBMC//cache/xbmc_backup_temp.zip
19:43:27 T:3148 ERROR: EXCEPTION: Unknown exception thrown from the call "read"
19:43:27 T:3148 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.RuntimeError'>
Error Contents: Unknown exception thrown from the call "read"
Traceback (most recent call last):
File "C:\Users\nicolas\AppData\Roaming\XBMC\addons\script.xbmcbackup\default.py", line 69, in <module>
backup.run(mode)
File "C:\Users\nicolas\AppData\Roaming\XBMC\addons\script.xbmcbackup\resources\lib\backup.py", line 248, in run
filesCopied = self.backupFiles(fileGroup['files'],self.xbmc_vfs,self.remote_vfs)
File "C:\Users\nicolas\AppData\Roaming\XBMC\addons\script.xbmcbackup\resources\lib\backup.py", line 461, in backupFiles
wroteFile = dest.put(aFile,dest.root_path + aFile[len(source.root_path):])
File "C:\Users\nicolas\AppData\Roaming\XBMC\addons\script.xbmcbackup\resources\lib\vfs.py", line 100, in put
self.zip.writestr(utils.encode(dest),aFile.read(),compress_type=zipfile.ZIP_DEFLATED)
RuntimeError: Unknown exception thrown from the call "read"
-->End of Python script error report<--
19:43:27 T:2500 DEBUG: ------ Window Init (DialogKaiToast.xml) ------
19:43:27 T:2416 INFO: CActiveAESink::OpenSink - initialize sink
19:43:27 T:2416 DEBUG: CActiveAESink::OpenSink - trying to open device WASAPI:{0F91D8E9-FB3D-4B15-A012-CEFE504EA93A}
19:43:27 T:2416 INFO: CAESinkWASAPI::InitializeExclusive: Format is Supported - will attempt to Initialize
19:43:27 T:2416 INFO: CAESinkWASAPI::InitializeExclusive: WASAPI Exclusive Mode Sink Initialized using: AE_FMT_S24NE4, 44100, 6
19:43:27 T:2416 DEBUG: CActiveAESink::OpenSink - WASAPI Initialized:
19:43:27 T:2416 DEBUG: Output Device : HDMI - 1 - VSX-1122 (AMD High Definition Audio Device)
19:43:27 T:2416 DEBUG: Sample Rate : 44100
19:43:27 T:2416 DEBUG: Sample Format : AE_FMT_S24NE4
19:43:27 T:2416 DEBUG: Channel Count : 6
19:43:27 T:2416 DEBUG: Channel Layout: FL,FR,FC,LFE,BL,BR
19:43:27 T:2416 DEBUG: Frames : 2208
19:43:27 T:2416 DEBUG: Frame Samples : 13248
19:43:27 T:2416 DEBUG: Frame Size : 24
19:43:28 T:3148 INFO: Python script stopped
19:43:28 T:3148 DEBUG: Thread LanguageInvoker 3148 terminating
19:43:28 T:2500 DEBUG: ------ Window Deinit (DialogExtendedProgressBar.xml) ------
19:43:33 T:2500 DEBUG: ------ Window Deinit (DialogKaiToast.xml) ------


RE: [Release] XBMC Backup - robweber - 2014-11-21

Yup, that is what is happening. Can I ask why you are backing up this directory? The zip file is always written to the location of special://temp/. This is xbmc's temp directory and shouldn't contain anything important. If you want to keep compressing backups you can't include this directory. If you turn off compression regular backups should work.


RE: [Release] XBMC Backup - 03397 - 2014-11-22

(2014-11-21, 01:46)robweber Wrote: Yup, that is what is happening. Can I ask why you are backing up this directory? The zip file is always written to the location of special://temp/. This is xbmc's temp directory and shouldn't contain anything important. If you want to keep compressing backups you can't include this directory. If you turn off compression regular backups should work.


I thought that this folder was not backuped by the plugin but it was.
Anyway. I have removed it and now it it working.

Just another question. If I create an xbmc from scratch and I restore this how can I restore all the settings that I have for my skin since I have tried it and the customizations that I did on my xbmc are not restored, only the plugins and their configuration. No configuration for my skin.

In a few words, I want to create an exact image for my XBMC so when I restore it I will have an identical copy.


RE: [Release] XBMC Backup - spager - 2014-11-22

(2014-11-22, 09:54)03397 Wrote:
(2014-11-21, 01:46)robweber Wrote: Yup, that is what is happening. Can I ask why you are backing up this directory? The zip file is always written to the location of special://temp/. This is xbmc's temp directory and shouldn't contain anything important. If you want to keep compressing backups you can't include this directory. If you turn off compression regular backups should work.


I thought that this folder was not backuped by the plugin but it was.
Anyway. I have removed it and now it it working.

Just another question. If I create an xbmc from scratch and I restore this how can I restore all the settings that I have for my skin since I have tried it and the customizations that I did on my xbmc are not restored, only the plugins and their configuration. No configuration for my skin.

In a few words, I want to create an exact image for my XBMC so when I restore it I will have an identical copy.

On Android I copied and over write my User Data folder and I also did the same to my Add on Folder and It made a clone.


RE: [Release] XBMC Backup - 03397 - 2014-11-22

(2014-11-22, 17:26)spager Wrote:
(2014-11-22, 09:54)03397 Wrote:
(2014-11-21, 01:46)robweber Wrote: Yup, that is what is happening. Can I ask why you are backing up this directory? The zip file is always written to the location of special://temp/. This is xbmc's temp directory and shouldn't contain anything important. If you want to keep compressing backups you can't include this directory. If you turn off compression regular backups should work.


I thought that this folder was not backuped by the plugin but it was.
Anyway. I have removed it and now it it working.

Just another question. If I create an xbmc from scratch and I restore this how can I restore all the settings that I have for my skin since I have tried it and the customizations that I did on my xbmc are not restored, only the plugins and their configuration. No configuration for my skin.

In a few words, I want to create an exact image for my XBMC so when I restore it I will have an identical copy.

On Android I copied and over write my User Data folder and I also did the same to my Add on Folder and It made a clone.


Did you use xbmcbackup in doing that? Did you backup a custom folder?


RE: [Release] XBMC Backup - spager - 2014-11-22

No I have an Android box and I copied my user data and addon folder using es3 file explorer to an sd card and on my new identical machine I installed the folders using es3 file explorer from the sd card.


RE: [Release] XBMC Backup - robweber - 2014-11-23

Xbmc backup works great for backups but restores are an issue. Specifically the guisettings file as this is where your skin customizations are. Read the FAQ on the first page of this thread and you'll understand. All other files can be restored with no issues.


RE: [Release] XBMC Backup - 03397 - 2014-11-23

(2014-11-23, 03:51)robweber Wrote: Xbmc backup works great for backups but restores are an issue. Specifically the guisettings file as this is where your skin customizations are. Read the FAQ on the first page of this thread and you'll understand. All other files can be restored with no issues.



Thanks appreciated for the info.


RE: [Release] XBMC Backup - JockeSve - 2014-11-28

It seems like XBMC Backup doesn't actually backup anything but empty folders with KODI 14 beta 5.
Backup takes less than 5 sec's (200+ movies, 50 000+ MP's, 900+ music vids, ...)
Tried uninstall/re-install but no luck.
Any ideas?

Config:
KODI 14 beta 5
Android 4.4.2


RE: [Release] XBMC Backup - lizard-king - 2014-11-28

@JockeSve:
The same happens on Win7, only empty folders. I'll post a debug log.