[Release] XBMC Backup

  Thread Rating:
  • 5 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
dallasnights Offline
Fan
Posts: 487
Joined: Jan 2011
Reputation: 0
Post: #46
ok something is wrong on my side I think, how do I do a clean unistall of the plugin so there are no traces left on XBMC ATV2 and then do a fresh install so then I can try it, please let me know

Thanks all
find quote
robweber Offline
Posting Freak
Posts: 921
Joined: Sep 2009
Reputation: 27
Post: #47
(2012-05-28 15:42)dallasnights Wrote:  ok something is wrong on my side I think, how do I do a clean unistall of the plugin so there are no traces left on XBMC ATV2 and then do a fresh install so then I can try it, please let me know

Thanks all

Under XBMC Settings -> Addons -> Enabled Addons (you may need to go up one folder level in the addons screen to see the enabled addons node, depends on the skin).

Once there find the XBMC Backup addon under Program Addons and bring up the addon information screen. From here you can select uninstall. I don't think this also deletes addon specific settings so it may be worth finding you userdata folder and deleting the xbmcbackup data folder under addon_data. If you are on an atv you'll probably need shell access to do this.

That should clear out all traces of the addon so you can start over.
find quote
dallasnights Offline
Fan
Posts: 487
Joined: Jan 2011
Reputation: 0
Post: #48
ok did a clean install 100% I think, deleted as you said, went into Winscp and deleted all userdata under the adon
Installed fresh
Picked a directory on my Win7 machine
Clicked on Addon

Went to Windows 7 machine, it starts and creates xbmc_backup directory where I wanted
But after 10 min boom it crashes back to front of ATV2
Went into directory on Win 7 nothing in directory no files nothing

Here is the only log i have for when I use this addon

10:36:00 T:170348544 NOTICE: -->Python Interpreter Initialized<--
10:36:01 T:170348544 NOTICE: script.xbmcbackup: Starting
10:36:01 T:170348544 NOTICE: script.xbmcbackup: Local Dir: /var/mobile/Library/Preferences/XBMC/
10:36:01 T:170348544 NOTICE: script.xbmcbackup: Remote Dir: smb://MEDIACENTER-HP/Users/Media Center/xbmc_backup/
10:37:35 T:100708352 NOTICE: Samba is idle. Closing the remaining connections
10:46:33 T:170348544 NOTICE: userdata/addon_data/
10:46:33 T:170348544 NOTICE: userdata/Database/
10:46:33 T:170348544 NOTICE: userdata/keymaps/
10:46:33 T:170348544 NOTICE: userdata/peripheral_data/
10:46:33 T:170348544 NOTICE: userdata/playlists/
10:46:33 T:170348544 NOTICE: userdata/plugin_data/
10:46:33 T:170348544 NOTICE: userdata/Thumbnails/
10:46:33 T:170348544 NOTICE: userdata/advancedsettings.xml
10:46:33 T:170348544 NOTICE: userdata/favourites.xml
10:46:33 T:170348544 NOTICE: userdata/guisettings.xml
10:46:33 T:170348544 NOTICE: userdata/LCD.xml
10:46:33 T:170348544 NOTICE: userdata/passwords.xml
10:46:33 T:170348544 NOTICE: userdata/profiles.xml
10:46:33 T:170348544 NOTICE: userdata/RssFeeds.xml
10:46:33 T:170348544 NOTICE: userdata/sources.xml
10:46:33 T:170348544 NOTICE: userdata/upnpserver.xml

Can someone help I know it worked in prev versions maybe email me a prev version to try or something

Thanks all
find quote
robweber Offline
Posting Freak
Posts: 921
Joined: Sep 2009
Reputation: 27
Post: #49
(2012-05-28 17:54)dallasnights Wrote:  ok did a clean install 100% I think, deleted as you said, went into Winscp and deleted all userdata under the adon
Installed fresh
Picked a directory on my Win7 machine
Clicked on Addon

Went to Windows 7 machine, it starts and creates xbmc_backup directory where I wanted
But after 10 min boom it crashes back to front of ATV2
Went into directory on Win 7 nothing in directory no files nothing

Here is the only log i have for when I use this addon

10:36:00 T:170348544 NOTICE: -->Python Interpreter Initialized<--
10:36:01 T:170348544 NOTICE: script.xbmcbackup: Starting
10:36:01 T:170348544 NOTICE: script.xbmcbackup: Local Dir: /var/mobile/Library/Preferences/XBMC/
10:36:01 T:170348544 NOTICE: script.xbmcbackup: Remote Dir: smb://MEDIACENTER-HP/Users/Media Center/xbmc_backup/
10:37:35 T:100708352 NOTICE: Samba is idle. Closing the remaining connections
10:46:33 T:170348544 NOTICE: userdata/addon_data/
10:46:33 T:170348544 NOTICE: userdata/Database/
10:46:33 T:170348544 NOTICE: userdata/keymaps/
10:46:33 T:170348544 NOTICE: userdata/peripheral_data/
10:46:33 T:170348544 NOTICE: userdata/playlists/
10:46:33 T:170348544 NOTICE: userdata/plugin_data/
10:46:33 T:170348544 NOTICE: userdata/Thumbnails/
10:46:33 T:170348544 NOTICE: userdata/advancedsettings.xml
10:46:33 T:170348544 NOTICE: userdata/favourites.xml
10:46:33 T:170348544 NOTICE: userdata/guisettings.xml
10:46:33 T:170348544 NOTICE: userdata/LCD.xml
10:46:33 T:170348544 NOTICE: userdata/passwords.xml
10:46:33 T:170348544 NOTICE: userdata/profiles.xml
10:46:33 T:170348544 NOTICE: userdata/RssFeeds.xml
10:46:33 T:170348544 NOTICE: userdata/sources.xml
10:46:33 T:170348544 NOTICE: userdata/upnpserver.xml

Can someone help I know it worked in prev versions maybe email me a prev version to try or something

Thanks all

All that can be confirmed from the log file is that the gathering of the file list completed, it may be that the actual writing from source to destination is having an issue. I added some additional logging to the version on github. If you can replace the default.py file of the version you have with the one from github your log file will start to have better information in it (also turn on debug logging in xbmc). Please post the full debug log to pastebin - not just the section where the addon is running.

https://github.com/robweber/xbmcbackup
find quote
dallasnights Offline
Fan
Posts: 487
Joined: Jan 2011
Reputation: 0
Post: #50
ok my log was way too big for pastebin

So here it is for your use
https://skydrive.live.com/redir?resid=A8...A14FF7!223

I tried again and it creates directory on PC but never puts any files in there

Hope this helps, be back later on to check on progress

Thanks
find quote
matt77303 Offline
Fan
Posts: 359
Joined: Dec 2011
Reputation: 6
Post: #51
Hi mate

is this right for my cron.xml?

<?xml version="1.0" ?> <cron/>
<cron>
<job name="backup xbmc" command="RunScript(script.xbmcbackup) " expression="59 23 * * *" show_notification="true" />
</cron>

im hoping that will back it run everynight at 11.59?

do i need to do anything else?

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
matt77303 Offline
Fan
Posts: 359
Joined: Dec 2011
Reputation: 6
Post: #52
I guess ive got it wrong somewhere...

im getting a script error when i run xbmc

http://pastebin.com/dPTi0Edj


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
robweber Offline
Posting Freak
Posts: 921
Joined: Sep 2009
Reputation: 27
Post: #53
(2012-05-28 22:21)matt77303 Wrote:  Hi mate

is this right for my cron.xml?

<?xml version="1.0" ?>
<cron>
<job name="backup xbmc" command="RunScript(script.xbmcbackup) " expression="59 23 * * *" show_notification="true" />
</cron>

im hoping that will back it run everynight at 11.59?

do i need to do anything else?

Matt

The script makes a closed cron tag when it makes the file at first run. I deleted it from your example above, cut ans paste into the cron.xml file and that should work.
find quote
matt77303 Offline
Fan
Posts: 359
Joined: Dec 2011
Reputation: 6
Post: #54
Thanks bud, I'll give it a try when I finish work.

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
dallasnights Offline
Fan
Posts: 487
Joined: Jan 2011
Reputation: 0
Post: #55
did the log I provided help you figures out what is wrong, is there a new build to try yet

Thanks for a great plugin hope to get to work soon
find quote
matt77303 Offline
Fan
Posts: 359
Joined: Dec 2011
Reputation: 6
Post: #56
everyting is working perfectly, got it backing up everynight with the link you did for me, if i wanted to do more to i just add another section to the cron file?

Also i still get a script error when i select 'user addons' in the file selection window, ignore that one and its perfect.
Thanks

Matt
One slight request

i have my xbmc machine set to run xbmc backup everynight at midnight thanks to robweber.

it backs everthing up to a folder on my sever called xbmc_backup and everytime it runs it overrights the files there.

would it be possible to backup to a folder called xbmc_backup_29_05_2012 then if it runs tomorrow it creates a folder called xbmc_backup_30_05_2012 and it copiesw the files to there? so i can pick what date i restore?

Thanks again for 2 brilliant pieces of software.

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
(This post was last modified: 2012-05-29 20:26 by matt77303.)
find quote
schumi2004 Offline
Posting Freak
Posts: 1,459
Joined: Aug 2011
Reputation: 15
Post: #57
Don't know what's going wrong with latest git pull

Code:
02:23:38 T:140381190608640  NOTICE: script.xbmcbackup: Starting
02:23:38 T:140381190608640  NOTICE: script.xbmcbackup: Local Dir: /storage/.xbmc/
02:23:38 T:140381190608640  NOTICE: script.xbmcbackup: Remote Dir: /storage/backup/xbmc_backup/
02:23:38 T:140381190608640  NOTICE: script.xbmcbackup: Remote Path exists - may have old files in it!
02:23:49 T:140381190608640   ERROR: Error Type: <type 'exceptions.UnicodeDecodeError'>
02:23:49 T:140381190608640   ERROR: Error Contents: 'utf8' codec can't decode byte 0x94 in position 73: invalid start byte
02:23:49 T:140381190608640   ERROR: Traceback (most recent call last):
                                              File "/storage/.xbmc/addons/script.xbmcbackup/default.py", line 192, in <module>
                                                backup.run()
                                              File "/storage/.xbmc/addons/script.xbmcbackup/default.py", line 120, in run
                                                self.syncFiles()
                                              File "/storage/.xbmc/addons/script.xbmcbackup/default.py", line 133, 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 61, in walkTree
                                                for (path, dirs, files) in vfs.walk(directory):
                                              File "/storage/.xbmc/addons/script.xbmcbackup/resources/lib/vfs.py", line 50, in walk
                                                for x in listdir(current_path, extra_metadata=True):
                                              File "/storage/.xbmc/addons/script.xbmcbackup/resources/lib/vfs.py", line 98, in listdir
                                                jsonobject = json.loads(json_response)
                                              File "/usr/lib/python2.7/json/__init__.py", line 326, in loads
                                                return _default_decoder.decode(s)
                                              File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
                                                obj, end = self.raw_decode(s, idx=_w(s, 0).end())
                                              File "/usr/lib/python2.7/json/decoder.py", line 382, in raw_decode
                                                obj, end = self.scan_once(s, idx)
                                            UnicodeDecodeError: 'utf8' codec can't decode byte 0x94 in position 73: invalid start byte

Any ideas?
find quote
robweber Offline
Posting Freak
Posts: 921
Joined: Sep 2009
Reputation: 27
Post: #58
@matt77303 - yes, just adding another <job /> tag to the cron.xml file will allow you to add other functions on different timers. The date option is interesting, I can see where it would be useful (and not too hard to implement). I'll add it to my github issues list and try to get it implemented within the next week or so. Not sure about the addons throwing an error - it seems that the json decoders used in parsing the file lists have problems with the filenames in certain addons not being utf compatible. I'm toying with the idea of trying to wrap the "walk" method in a try - catch so that these files can be flagged and everything else continue.

@dallasnights - I'm really at a loss for what you are seeing here. The addon is creating the file list but then stalling out right at the end when it is actually trying to create the files. Just for troubleshooting sake I would attempt to write to a different share - even a local folder - just to rule out any problems on that end. I also see you're running a GIT version of xbmc. Not that it should matter but there could be other issues related to python or the vfs library going on here.

@schumi2004 - tracing the error it looks like the python json libraries don't like something to do with the characters found (utf8 error) in your files. If you turn on debugging you may at least get the name of the file that is causing the error, although it is happening within a python library so there isn't a whole lot that can be done (other than removing the file).
find quote
dallasnights Offline
Fan
Posts: 487
Joined: Jan 2011
Reputation: 0
Post: #59
ok I can try that later, but if not the GIT version where can I get another version that might work
FYI since .08 that latest I have had this problem
The other day I found an older version .02 or 03 I think, and installed that and it worked for a bit starting to copy folders and such then that crashed and returned to the Apple menu. No I dont have that log since I installed the latest over it

Anyhow, not sure what is wrong, but I really want to JB my ATV2 tonight and start fresh but really wanted to backup all my old items so I dont loose things like plugins and favorites and such first

Let me know your thoughts

Thanks
find quote
dallasnights Offline
Fan
Posts: 487
Joined: Jan 2011
Reputation: 0
Post: #60
could you share maybe Version 0.0.4 or Version 0.0.6 and I can try that

did what you said, tried on another share, my laptop same problem

Let me know thanks
find quote
Post Reply