[Release] XBMC Backup

  Thread Rating:
  • 5 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
robweber Offline
Posting Freak
Posts: 885
Joined: Sep 2009
Reputation: 27
Post: #16
Thanks for posting the log. I think you're right about the dash, however I know for a fact that dashes will work since I use them to designate directory vs file when writing the restore.txt document. I'm going to get the skin you're trying to backup and see if I can recreate the error. I'll report back what I find.
find quote
Bond13579 Offline
Junior Member
Posts: 34
Joined: Feb 2012
Reputation: 0
Post: #17
I'm not sure anymore cause I just did a lookup of Unicode \u201d and it's a double quotation mark.
find quote
e2zippo Offline
Senior Member
Posts: 211
Joined: Dec 2010
Reputation: 0
Post: #18
Just tried it on both my XBMC installs and the script fails, I'm running Aeon Nox Beta 3.0.0
(This post was last modified: 2012-05-07 17:47 by e2zippo.)
find quote
robweber Offline
Posting Freak
Posts: 885
Joined: Sep 2009
Reputation: 27
Post: #19
I'm having a hard time reproducing this (ie, I can't!). The skin may or may not be relevant, although I've tried the ones listed above with no issues on my end. It may be another addon or file path altogether.

@Bond13579 - could you post a full debug log to the xbmc pastebin site? Start with turning on XBMC, then run the backup addon until it errors and post everything. I'm trying to narrow down exactly what addons and settings are being used so I can recreate them. Also, what options are you using - Addons, Addon Data, thumbnails etc.

Thanks.
find quote
lifenoobie Offline
Junior Member
Posts: 1
Joined: May 2012
Reputation: 0
Post: #20
@robweber: I have the same problem as e2zippo. Was having problems with sound after adding addons. Luckily I backed up xbmc prior to the additions. Although I was getting the script error message described above. After fruitless attempts, I uninstalled xbmc, and reinstalled. I added "xbmc backup" and I'm not able to restore my previous settings. I'm getting the same script error. I tried debugging, but I don't actually see where the "xbmc.log" is stored. Below is the log file. Any ideas what I'm doing wrong? Thanks for the help!

20:24:29 T:5068 NOTICE: script.xbmcbackup: Starting
20:24:29 T:5068 NOTICE: script.xbmcbackup: Local Dir: C:\Users\media center\AppData\Roaming\XBMC\
20:24:29 T:5068 NOTICE: script.xbmcbackup: Remote Dir: smb://FREENAS/media_drive/downloads/xbmc_backup/xbmc_backup/
20:24:29 T:5068 INFO: Loading skin file: DialogProgress.xml
20:24:29 T:5068 DEBUG: DialogProgress::StartModal called
20:24:29 T:5068 DEBUG: ------ Window Init (DialogProgress.xml) ------
20:24:29 T:5068 DEBUG: JSONRPC: Incoming request: { "jsonrpc" : "2.0" , "method" : "Files.GetDirectory" , "params" : { "directory" : "smb://FREENAS/media_drive/downloads/xbmc_backup/xbmc_backup/addons/" , "sort" : { "method" : "file" } } , "id" : 1 }
20:24:29 T:5068 DEBUG: JSONRPC: Calling files.getdirectory
20:24:29 T:5068 DEBUG: CUtil::GetMatchingSource: no matching source found for [smb://FREENAS/media_drive/downloads/xbmc_backup/xbmc_backup/addons/]
20:24:29 T:5068 DEBUG: Previous line repeats 4 times.
20:24:29 T:5068 ERROR: XFILE::CDirectory::GetDirectory - Error getting smb://FREENAS/media_drive/downloads/xbmc_backup/xbmc_backup/addons/
20:24:29 T:5068 INFO: -->Python script returned the following error<--
20:24:29 T:5068 ERROR: Error Type: <type 'exceptions.KeyError'>
20:24:29 T:5068 ERROR: Error Contents: 'result'
20:24:29 T:5068 ERROR: Traceback (most recent call last):
File "C:\Users\media center\AppData\Roaming\XBMC\addons\script.xbmcbackup\default.py", line 188, in <module>
backup.run()
File "C:\Users\media center\AppData\Roaming\XBMC\addons\script.xbmcbackup\default.py", line 122, in run
self.restoreFiles()
File "C:\Users\media center\AppData\Roaming\XBMC\addons\script.xbmcbackup\default.py", line 140, in restoreFiles
self.fileManager.createFileList(self.Addon)
File "C:\Users\media center\AppData\Roaming\XBMC\addons\script.xbmcbackup\default.py", line 26, in createFileList
self.walkTree(self.walk_path + "addons/")
File "C:\Users\media center\AppData\Roaming\XBMC\addons\script.xbmcbackup\default.py", line 57, in walkTree
for (path, dirs, files) in vfs.walk(directory):
File "C:\Users\media center\AppData\Roaming\XBMC\addons\script.xbmcbackup\resources\lib\vfs.py", line 50, in walk
for x in listdir(current_path, extra_metadata=True):
File "C:\Users\media center\AppData\Roaming\XBMC\addons\script.xbmcbackup\resources\lib\vfs.py", line 100, in listdir
if jsonobject['result']['files']:
KeyError: 'result'
20:24:29 T:5068 INFO: -->End of Python script error report<--
20:24:29 T:5068 INFO: Python script stopped

[Image: screenshot001.png]
(This post was last modified: 2012-05-14 02:42 by lifenoobie.)
find quote
robweber Offline
Posting Freak
Posts: 885
Joined: Sep 2009
Reputation: 27
Post: #21
(2012-05-14 01:18)lifenoobie Wrote:  @robweber: I have the same problem as e2zippo. Was having problems with sound after adding addons. Luckily I backed up xbmc prior to the additions. Although I was getting the script error message described above. After fruitless attempts, I uninstalled xbmc, and reinstalled. I added "xbmc backup" and I'm not able to restore my previous settings. I'm getting the same script error. I tried debugging, but I don't actually see where the "xbmc.log" is stored. Below is the log file. Any ideas what I'm doing wrong? Thanks for the help!

20:24:29 T:5068 NOTICE: script.xbmcbackup: Starting
20:24:29 T:5068 NOTICE: script.xbmcbackup: Local Dir: C:\Users\media center\AppData\Roaming\XBMC\
20:24:29 T:5068 NOTICE: script.xbmcbackup: Remote Dir: smb://FREENAS/media_drive/downloads/xbmc_backup/xbmc_backup/
20:24:29 T:5068 INFO: Loading skin file: DialogProgress.xml
20:24:29 T:5068 DEBUG: DialogProgress::StartModal called
20:24:29 T:5068 DEBUG: ------ Window Init (DialogProgress.xml) ------
20:24:29 T:5068 DEBUG: JSONRPC: Incoming request: { "jsonrpc" : "2.0" , "method" : "Files.GetDirectory" , "params" : { "directory" : "smb://FREENAS/media_drive/downloads/xbmc_backup/xbmc_backup/addons/" , "sort" : { "method" : "file" } } , "id" : 1 }
20:24:29 T:5068 DEBUG: JSONRPC: Calling files.getdirectory
20:24:29 T:5068 DEBUG: CUtil::GetMatchingSource: no matching source found for [smb://FREENAS/media_drive/downloads/xbmc_backup/xbmc_backup/addons/]
20:24:29 T:5068 DEBUG: Previous line repeats 4 times.
20:24:29 T:5068 ERROR: XFILE::CDirectory::GetDirectory - Error getting smb://FREENAS/media_drive/downloads/xbmc_backup/xbmc_backup/addons/
20:24:29 T:5068 INFO: -->Python script returned the following error<--
20:24:29 T:5068 ERROR: Error Type: <type 'exceptions.KeyError'>
20:24:29 T:5068 ERROR: Error Contents: 'result'
20:24:29 T:5068 ERROR: Traceback (most recent call last):
File "C:\Users\media center\AppData\Roaming\XBMC\addons\script.xbmcbackup\default.py", line 188, in <module>
backup.run()
File "C:\Users\media center\AppData\Roaming\XBMC\addons\script.xbmcbackup\default.py", line 122, in run
self.restoreFiles()
File "C:\Users\media center\AppData\Roaming\XBMC\addons\script.xbmcbackup\default.py", line 140, in restoreFiles
self.fileManager.createFileList(self.Addon)
File "C:\Users\media center\AppData\Roaming\XBMC\addons\script.xbmcbackup\default.py", line 26, in createFileList
self.walkTree(self.walk_path + "addons/")
File "C:\Users\media center\AppData\Roaming\XBMC\addons\script.xbmcbackup\default.py", line 57, in walkTree
for (path, dirs, files) in vfs.walk(directory):
File "C:\Users\media center\AppData\Roaming\XBMC\addons\script.xbmcbackup\resources\lib\vfs.py", line 50, in walk
for x in listdir(current_path, extra_metadata=True):
File "C:\Users\media center\AppData\Roaming\XBMC\addons\script.xbmcbackup\resources\lib\vfs.py", line 100, in listdir
if jsonobject['result']['files']:
KeyError: 'result'
20:24:29 T:5068 INFO: -->End of Python script error report<--
20:24:29 T:5068 INFO: Python script stopped

[Image: screenshot001.png]

If you're doing a restore, my guess would be there is an error in your remote path settings. According to the log your path is this - smb://FREENAS/media_drive/downloads/xbmc_backup/xbmc_backup/.

My guess is that originally you specified this: smb://FREENAS/media_drive/downloads/ and then specified that the xbmc_backup folder name be given to the name of the folder you want created for backups (these are two different settings). When you re-installed xbmc backup you then specified the entire folder - including the xbmc_backup sub folder - and expected it to find your backup data. Since another subfolder called xbmc_backup does not exist within this directory you get a "file not found" error.

Try modifying your settings to read smb://FREENAS/media_drive/downloads/ as the remote directory and xbmc_backup as the folder name to see if you get any better results.
find quote
brando56894 Offline
Senior Member
Posts: 103
Joined: Jan 2010
Reputation: 1
Post: #22
I'm using Chakra Linux and whenever I try to run the script I get this error:

20:21:04 T:140508814882560 NOTICE: -->Python Interpreter Initialized<--
20:21:04 T:140508814882560 NOTICE: script.xbmcbackup: Starting
20:21:04 T:140508814882560 NOTICE: script.xbmcbackup: Local Dir: /home/bran/.xbmc/
20:21:04 T:140508814882560 NOTICE: script.xbmcbackup: Remote Dir: /media/External/xbmc_backup/
20:21:04 T:140508814882560 NOTICE: script.xbmcbackup: Remote Path exists - may have old files in it!
20:21:06 T:140508814882560 ERROR: Error Type: <type 'exceptions.UnicodeEncodeError'>
20:21:06 T:140508814882560 ERROR: Error Contents: 'ascii' codec can't encode character u'\xe1' in position 28: ordinal not in range(128)
20:21:06 T:140508814882560 ERROR: Traceback (most recent call last):
File "/home/bran/.xbmc/addons/script.xbmcbackup/default.py", line 188, in <module>
backup.run()
File "/home/bran/.xbmc/addons/script.xbmcbackup/default.py", line 119, in run
self.syncFiles()
File "/home/bran/.xbmc/addons/script.xbmcbackup/default.py", line 132, in syncFiles
self.fileManager.createFileList(self.Addon)
File "/home/bran/.xbmc/addons/script.xbmcbackup/default.py", line 32, in createFileList
self.walkTree(self.walk_path + "userdata/addon_data/")
File "/home/bran/.xbmc/addons/script.xbmcbackup/default.py", line 65, in walkTree
self.addFile(filePath)
File "/home/bran/.xbmc/addons/script.xbmcbackup/default.py", line 70, in addFile
self.fHandle.write(str(filename) + "\n")
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe1' in position 28: ordinal not in range(128)
20:21:24 T:140509829908224 WARNING: CreateLoader - Unsupported protocol(addons) in addons://more/executable.tbn
20:21:24 T:140508848453376 WARNING: CreateLoader - Unsupported protocol(addons) in addons://more/fanart.jpg
20:21:24 T:140508831667968 WARNING: Previous line repeats 1 times.
20:21:24 T:140508831667968 WARNING: CreateLoader - Unsupported protocol(addons) in addons://more/executablefanart.jpg
20:21:24 T:140508823275264 WARNING: Previous line repeats 1 times.
20:21:24 T:140508823275264 WARNING: CreateLoader - Unsupported protocol(script) in script://script.transmission/fanart.jpg
20:21:24 T:140508848453376 WARNING: Previous line repeats 1 times.
20:21:24 T:140508848453376 WARNING: CreateLoader - Unsupported protocol(script) in script://script.tv.show.next.aired/fanart.jpg
20:21:24 T:140508831667968 WARNING: Previous line repeats 1 times.
20:21:24 T:140508831667968 WARNING: CreateLoader - Unsupported protocol(script) in script://script.globalsearch/fanart.jpg
20:21:24 T:140508848453376 WARNING: Previous line repeats 1 times.
20:21:24 T:140508848453376 WARNING: CreateLoader - Unsupported protocol(script) in script://script.pseudotv/fanart.jpg
20:21:24 T:140509978539776 WARNING: Previous line repeats 1 times.
20:21:24 T:140509978539776 WARNING: CreateLoader - Unsupported protocol(script) in script://script.games.rom.collection.browser/fanart.jpg
20:21:25 T:140508823275264 WARNING: Previous line repeats 1 times.
20:21:25 T:140508823275264 WARNING: CreateLoader - Unsupported protocol(script) in script://script.xbmcbackup/fanart.jpg
20:21:26 T:140508814882560 WARNING: Previous line repeats 1 times.
find quote
ricostuart Offline
Junior Member
Posts: 41
Joined: Aug 2009
Reputation: 0
Post: #23
Hi,

Firstly - great idea on the plugin! Its quite rare for a really great idea to come out like this! Thanks very much!

Now, I seem to be unable to use the plugin. I am quite noobish to it all. I have a dedicated PC running XBMCbuntu (latest one) and run a Netgear ReadyNAS file server. I have the systems all talking and sharing quite happily. However, when I setup the plugin to backup to the server (smb://Mediaserver/Backup/) with a folder name of XBMC (which has been manually created on the drive).

Everytime I try to run the plugin it says Gathering file list, then quickly a popup saying Error: Script failed: script.xbmcbackup.

Any ideas?
find quote
brando56894 Offline
Senior Member
Posts: 103
Joined: Jan 2010
Reputation: 1
Post: #24
Check your xbmc.log and post it here, it will tell you what is specifically causing the problem. It will most likely be at /home/[username]/.xbmc/temp/xbmc.log
find quote
ricostuart Offline
Junior Member
Posts: 41
Joined: Aug 2009
Reputation: 0
Post: #25
Sorry to be a PITA, how do I get access to the file? Do I need to go via the desktop or can it be accessed via XBMC?
find quote
brando56894 Offline
Senior Member
Posts: 103
Joined: Jan 2010
Reputation: 1
Post: #26
I believe there's a plugin available to upload XBMC logs, but to view it the easiest way to do it would be outside of XBMC via nautilus (The Gnome file manager). You could also use the XBMC filemanager but you have to add a path to it and I believe it doesn't have an option to show hidden files.
find quote
matt77303 Offline
Fan
Posts: 359
Joined: Dec 2011
Reputation: 6
Post: #27
Im getting script error as soon as i run it as well

log below

http://pastebin.com/K9KVcU13

Matt

CPU - AMD Athlon™ II X2 Dual-Core 3.4Ghz
MB - ASUS M5A78L-M/USB3, Nvidia 610 2GB
RAM - 4GB DDR3 Dual-Channel
OS - XBMC Frodo
TV - Panasonic TX-P50S21B
Home Cinema - Pioneer VSX-S300 5.1
Remote - Harmony one
find quote
DuMbGuM Offline
Fan
Posts: 448
Joined: Sep 2008
Reputation: 1
Location: Ireland
Post: #28
Great work, going to see if I can backup/restore watched episodes etc now.

[Image: watched-clearlogo.jpg]
find quote
schumi2004 Offline
Posting Freak
Posts: 1,356
Joined: Aug 2011
Reputation: 14
Post: #29
I thought this would come in handy but i guess i have the same error as Bond13579 has.

Code:
3:19:49 T:2939681600  NOTICE: script.xbmcbackup: Starting
23:19:49 T:2939681600  NOTICE: script.xbmcbackup: Local Dir: /storage/.xbmc/
23:19:49 T:2939681600  NOTICE: script.xbmcbackup: Remote Dir: /storage/backup/backup/xbmc_backup/
23:19:52 T:2939681600   ERROR: Error Type: <type 'exceptions.UnicodeEncodeError'>
23:19:52 T:2939681600   ERROR: Error Contents: 'ascii' codec can't encode character u'\u201d' in position 58: ordinal not in range(128)
23:19:52 T:2939681600   ERROR: Traceback (most recent call last):
                                              File "/storage/.xbmc/addons/script.xbmcbackup/default.py", line 188, in <module>
                                                backup.run()
                                              File "/storage/.xbmc/addons/script.xbmcbackup/default.py", line 119, in run
                                                self.syncFiles()
                                              File "/storage/.xbmc/addons/script.xbmcbackup/default.py", line 132, in syncFiles
                                                self.fileManager.createFileList(self.Addon)
                                              File "/storage/.xbmc/addons/script.xbmcbackup/default.py", line 26, in createFileList
                                                self.walkTree(self.walk_path + "addons/")
                                              File "/storage/.xbmc/addons/script.xbmcbackup/default.py", line 65, in walkTree
                                                self.addFile(filePath)
                                              File "/storage/.xbmc/addons/script.xbmcbackup/default.py", line 70, in addFile
                                                self.fHandle.write(str(filename) + "\n")
                                            UnicodeEncodeError: 'ascii' codec can't encode character u'\u201d' in position 58: ordinal not in range(128)

EDIT:
I'm doing a clean install to see were it breaks.
First thing i noticed is that it didn't completely backup my userdata folder,
it didn't backup
userdata
- peripheral_data
- keymaps
config files
database
playlist
thumbnails/fanart

All options enabled, Why?

EDIT2:
It breaks when MQ3 skin installed.
(This post was last modified: 2012-05-18 15:31 by schumi2004.)
find quote
robweber Offline
Posting Freak
Posts: 885
Joined: Sep 2009
Reputation: 27
Post: #30
Hey everyone, just wanted to throw a post out here quick to let everyone know I am monitoring this thread. I've away traveling for the past 10 days so I'm just starting to go through these posted logs. The logs are definitely a help so thanks for all the great info. I'll post back here when I have something figured out.
find quote
Post Reply