[Release] XBMC Backup

  Thread Rating:
  • 5 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
startreksuite Offline
Junior Member
Posts: 8
Joined: Apr 2014
Reputation: 0
Post: #676
(2014-07-12 20:19)robweber Wrote:  
(2014-07-10 23:05)YellowDog Wrote:  Great program, this addon saved me a couple of times.

I keep XBMC in suspend mode when not in use. I have a cron on my home NAS that does a WOL just before XBMC Backup is scheduled to run. After the backup is complete the only option in XBMC Backup is to shutdown, which I don't want to do. I'm running OpenELEC, so I created a cron entry in OpenELEC to put the system in suspend mode. I do this 15 minutes after the backup is scheduled to run, which should be plenty of time for the backup to complete.

Could XBMC Backup be updated to allow the system to suspend after the backup has finished?

Right now the "Shutdown on Complete" function is called the built in Shutdown() function of xbmc. According to the wiki this function will call whatever the default shutdown action, as defined in System Settings is. So in theory you should just be able to adjust this value in XBMC to "suspend" rather than "shutdown" and the addon will execute the correct behavior. I believe the right place is in System Settings -> Power Saving -> Shutdown Function

(2014-07-11 01:18)startreksuite Wrote:  Hello again! I was restoring my gbox the other day to fix one of my addons. The restore did not fix the issue, and now I am wondering if one of my settings is the culprit, or a repository that is causing the issue. I am curious is there a simple fix, like removing some of the files that I believe might be the issue, or is it more complicated than that?
Thanks in advance!

I would disable any service addons (one at a time) until you can figure out the problem. A restore will just put all your addons back so you may not fix the issue if one of them is causing the problem.

(2014-07-11 16:49)AnthonyJS02 Wrote:  Curious if I'm understanding how this works correct. I upgraded my computer to windows 8.1 so wanted to do a fresh install. I used the back up on github for the Gotham version. It made a back up everything it looked like. I then got to point I wanted to restore. Is this supposed to make the machine look just before? Or does it not change the skin and re add all the sources? Cause if so it didn't do it first time last night and haven't had chance to try again yet. Thanks.

Edit: went in and manually copied and replaced all the information from the back up into correct folders and seemed to do the trick. Sources are all added back and skin is set just got dig into settings. I could tell it didn't copy all because file sizes were different. Was running backup to and from NAS.

Are you sure the files didn't copy? I'd need a debug log to confirm that. One of the most common problems is that you run the restore, but since the guisettings.xml file can't be restored while XBMC is running you don't get any visual changes to the system. This file has all the information regarding your skin preferences and other gui setting information. Odds are this file just wasn't copied.
Thanks
find quote
imaddicted2u Offline
Junior Member
Posts: 38
Joined: Dec 2013
Reputation: 0
Post: #677
I'm using the XBMC backup on a few Android mini PC's running a custom 4.4.2 KitKat rom and XBMC Gotham. I often flash new custom rom releases and find XBMC backup to be quite helpful. While it restores many things there are a few settings that it doesn't restore such as the weather app configuration and some other settings like international/region and menus settings level. Also I have to set content on the Movies folder I use from a SMB share on my local network to get "Movies" to appear on the main menu again.
These are minor details but I thought I'd point them out. Thanks for all the work you have done on this app. It has saved me loads of time.
(This post was last modified: 2014-07-20 00:05 by imaddicted2u.)
find quote
Jayhawk Offline
Junior Member
Posts: 7
Joined: Jun 2014
Reputation: 0
Post: #678
@imaddicted2u: I have just started the same process. Only with a Amlogic M8 box. But, same ideas...Android based custom roms and keeping the same xbmc settings. Interested to know what roms you are using and some of the methods in general. Interested in creating a thread of this or pm discussion?
find quote
imaddicted2u Offline
Junior Member
Posts: 38
Joined: Dec 2013
Reputation: 0
Post: #679
(2014-07-20 20:01)Jayhawk Wrote:  @imaddicted2u: I have just started the same process. Only with a Amlogic M8 box. But, same ideas...Android based custom roms and keeping the same xbmc settings. Interested to know what roms you are using and some of the methods in general. Interested in creating a thread of this or pm discussion?

Sent you a PM
find quote
robweber Offline
Posting Freak
Posts: 866
Joined: Sep 2009
Reputation: 26
Post: #680
(2014-07-19 23:13)imaddicted2u Wrote:  I'm using the XBMC backup on a few Android mini PC's running a custom 4.4.2 KitKat rom and XBMC Gotham. I often flash new custom rom releases and find XBMC backup to be quite helpful. While it restores many things there are a few settings that it doesn't restore such as the weather app configuration and some other settings like international/region and menus settings level. Also I have to set content on the Movies folder I use from a SMB share on my local network to get "Movies" to appear on the main menu again.
These are minor details but I thought I'd point them out. Thanks for all the work you have done on this app. It has saved me loads of time.

Most of what you are asking can be traced to the guisettings.xml file not being restored correctly when XBMC is running. This is an inherent problem of XBMC and prevents many of the visual customizations from displaying correctly, including the internation/region settings. Setting the content on your source does surprise me though. I had thought this information was stored in the database and would come over automatically (perhaps after a restart) once the restore process completed. I have several linked XBMC instances via MySQL and when setting up a new one I usually just need to restore the sources.xml and advancedsettings.xml (for the db connection) and everything comes right in.
find quote
dynamic2 Offline
Junior Member
Posts: 3
Joined: Mar 2014
Reputation: 0
Post: #681
i looked over this threat but didnt find my question is it possible to set the backup location as a ftp server (http://ftp.websitename.com) so i can do backup multiply devices at once from the same backup at different locations from the like to say working device/updated one.
find quote
durd Offline
Junior Member
Posts: 2
Joined: Jul 2014
Reputation: 0
Post: #682
Hi!

Im running xbmcbackup 0.5.5 on raspbmc with xbmc 13.1 (compiled: jun 11 2014) and i have my backup set up to backup to Dropbox every sunday night (monday morning) at 4am. Ive also configured xbmcbackup to only keep 5 backups.

Now my problem is that whenever its done backing up, it wants to remove a backup, right? Well, for a while now (since ~May when i started using xbmcbackup) its been failing to do just that. And today i had enough time to go through the logs:

Code:
05:49:06 T:2851771456  NOTICE: script.xbmcbackup-0.5.5: Removing backup 201405120400
05:49:09 T:2851771456   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <class 'resources.lib.dropbox.rest.ErrorResponse'>
                                            Error Contents: [406] u'There are too many files involved in this operation.'
                                            Traceback (most recent call last):
                                              File "/home/pi/.xbmc/addons/script.xbmcbackup/scheduler.py", line 151, in <module>
                                                BackupScheduler().start()
                                              File "/home/pi/.xbmc/addons/script.xbmcbackup/scheduler.py", line 57, in start
                                                backup.run(XbmcBackup.Backup,True)
                                              File "/home/pi/.xbmc/addons/script.xbmcbackup/resources/lib/backup.py", line 212, in run
                                                self._rotateBackups()
                                              File "/home/pi/.xbmc/addons/script.xbmcbackup/resources/lib/backup.py", line 385, in _rotateBackups
                                                self.remote_vfs.rmdir(self.remote_base_path + dirs[remove_num][0] + "/")
                                              File "/home/pi/.xbmc/addons/script.xbmcbackup/resources/lib/vfs.py", line 134, in rmdir
                                                self.client.file_delete(directory)
                                              File "/home/pi/.xbmc/addons/script.xbmcbackup/resources/lib/dropbox/client.py", line 612, in file_delete
                                                return self.rest_client.POST(url, params, headers)
                                              File "/home/pi/.xbmc/addons/script.xbmcbackup/resources/lib/dropbox/rest.py", line 260, in POST
                                                return cls.IMPL.POST(*n, **kw)
                                              File "/home/pi/.xbmc/addons/script.xbmcbackup/resources/lib/dropbox/rest.py", line 207, in POST
                                                post_params=params, headers=headers, raw_response=raw_response)
                                              File "/home/pi/.xbmc/addons/script.xbmcbackup/resources/lib/dropbox/rest.py", line 183, in request
                                                raise ErrorResponse(r)
                                            ErrorResponse: [406] u'There are too many files involved in this operation.'
                                            -->End of Python script error report<--

Any ideas? xbmcbackup has read/write permission according to Dropbox API.

Also, a feature request; Maybe its not possible, but xbmcbackup seems to be incredibly slow at backing up. When i get to work at ~7:30am my dropbox at work is still receiving files and keeps notifiying me of new files. I guess it could be a "feature" of the API but if there is a way to deal with it except for pausing dropbox sync until anytime later that would be awesome Smile
It seems like xbmcbackup doesnt batch-upload the files and does one at a time, waits for a confirmation and then does another.
find quote
robweber Offline
Posting Freak
Posts: 866
Joined: Sep 2009
Reputation: 26
Post: #683
(Yesterday 20:09)durd Wrote:  Hi!

Im running xbmcbackup 0.5.5 on raspbmc with xbmc 13.1 (compiled: jun 11 2014) and i have my backup set up to backup to Dropbox every sunday night (monday morning) at 4am. Ive also configured xbmcbackup to only keep 5 backups.

Now my problem is that whenever its done backing up, it wants to remove a backup, right? Well, for a while now (since ~May when i started using xbmcbackup) its been failing to do just that. And today i had enough time to go through the logs:

Code:
05:49:06 T:2851771456  NOTICE: script.xbmcbackup-0.5.5: Removing backup 201405120400
05:49:09 T:2851771456   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <class 'resources.lib.dropbox.rest.ErrorResponse'>
                                            Error Contents: [406] u'There are too many files involved in this operation.'
                                            Traceback (most recent call last):
                                              File "/home/pi/.xbmc/addons/script.xbmcbackup/scheduler.py", line 151, in <module>
                                                BackupScheduler().start()
                                              File "/home/pi/.xbmc/addons/script.xbmcbackup/scheduler.py", line 57, in start
                                                backup.run(XbmcBackup.Backup,True)
                                              File "/home/pi/.xbmc/addons/script.xbmcbackup/resources/lib/backup.py", line 212, in run
                                                self._rotateBackups()
                                              File "/home/pi/.xbmc/addons/script.xbmcbackup/resources/lib/backup.py", line 385, in _rotateBackups
                                                self.remote_vfs.rmdir(self.remote_base_path + dirs[remove_num][0] + "/")
                                              File "/home/pi/.xbmc/addons/script.xbmcbackup/resources/lib/vfs.py", line 134, in rmdir
                                                self.client.file_delete(directory)
                                              File "/home/pi/.xbmc/addons/script.xbmcbackup/resources/lib/dropbox/client.py", line 612, in file_delete
                                                return self.rest_client.POST(url, params, headers)
                                              File "/home/pi/.xbmc/addons/script.xbmcbackup/resources/lib/dropbox/rest.py", line 260, in POST
                                                return cls.IMPL.POST(*n, **kw)
                                              File "/home/pi/.xbmc/addons/script.xbmcbackup/resources/lib/dropbox/rest.py", line 207, in POST
                                                post_params=params, headers=headers, raw_response=raw_response)
                                              File "/home/pi/.xbmc/addons/script.xbmcbackup/resources/lib/dropbox/rest.py", line 183, in request
                                                raise ErrorResponse(r)
                                            ErrorResponse: [406] u'There are too many files involved in this operation.'
                                            -->End of Python script error report<--

Any ideas? xbmcbackup has read/write permission according to Dropbox API.

Also, a feature request; Maybe its not possible, but xbmcbackup seems to be incredibly slow at backing up. When i get to work at ~7:30am my dropbox at work is still receiving files and keeps notifiying me of new files. I guess it could be a "feature" of the API but if there is a way to deal with it except for pausing dropbox sync until anytime later that would be awesome Smile
It seems like xbmcbackup doesnt batch-upload the files and does one at a time, waits for a confirmation and then does another.

I think you found an interesting "feature" of the Dropbox api. Seems that if the folder you are trying to delete contains too many files it will just refuse to delete it. Perfect. Looks like I'll have to add some logic on the Dropbox VFS end of things to delete folders recursively up to the root folder - will make this a longer operation. Adding this to github and will get to it soon.

You are correct about the speed of the dropbox upload process. It is slow. Their Python API doesn't have any mechanism for batch uploading, or even uploading things by folder, just one file at a time. Since it's REST based you have to wait for the upload and then do it again. To be honest - if you have a system that can support the regular Dropbox client you're almost better off installing it and using that as a client. The integrated Dropbox target is meant for stuff like OpenELEC or small systems where this isn't feasible. Personally I back up my XBMC host to a NAS and the NAS then syncs with Dropbox. Makes the backup happen really fast locally and then regular Dropbox client can sync from there.
find quote
durd Offline
Junior Member
Posts: 2
Joined: Jul 2014
Reputation: 0
Post: #684
(Yesterday 22:07)robweber Wrote:  I think you found an interesting "feature" of the Dropbox api. Seems that if the folder you are trying to delete contains too many files it will just refuse to delete it. Perfect. Looks like I'll have to add some logic on the Dropbox VFS end of things to delete folders recursively up to the root folder - will make this a longer operation. Adding this to github and will get to it soon.
Yay! Big Grin
For reference, although i think its easy to get the number of files directly from python, ive seen backups between 10 000 and 12 000 files, and i have unchecked the Backup thumbnails option.

(Yesterday 22:07)robweber Wrote:  You are correct about the speed of the dropbox upload process. It is slow. Their Python API doesn't have any mechanism for batch uploading, or even uploading things by folder, just one file at a time. Since it's REST based you have to wait for the upload and then do it again. To be honest - if you have a system that can support the regular Dropbox client you're almost better off installing it and using that as a client. The integrated Dropbox target is meant for stuff like OpenELEC or small systems where this isn't feasible. Personally I back up my XBMC host to a NAS and the NAS then syncs with Dropbox. Makes the backup happen really fast locally and then regular Dropbox client can sync from there.
Yeah, i thought it would be this, else it would have worked properly from the start or been fixed along the way.
What about incremental backups? Or this could go together with the Git issue to compress or package the backup to one file.

Ill look into getting a proper Dropbox client for my rpi. My NAS runs FreeBSD which isnt supported except via API...

Also, thanks for the awesomely quick response Smile
find quote
Post Reply