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 - pettergulbra - 2013-01-09

Thanks again for a really good and nice explanation answer.

I think I understood it now. Thanks.

Kindly, now I know a little more. :-)


RE: [Release] XBMC Backup - SFX Group - 2013-01-13

BUG FOUND? (Raspberry PI and restore)
Hi

I know we have an issue with the GUISETTINGS.XML file not being restored, however this appears to the tip of a very large iceburg.

No settings.xml files are being restored when i do a restore.

I clear the STORAGE partition (corrupted again), run XBMC, install this backup add in, by this time ive already copied over the latest backup from my store to the SD card.

I select this to restore, it does everything (add-ons etc..), however none of the settings.xml files get copied over to the add-on directories, there all "not configured", however when checking the backup folder i can see the settings.xml files and they have the settings in them.

Why are they not getting copied back to the SD storage card OR are they and XBMC isn’t writing the file (same as the guisettings.xml)?

This created a huge problem, other than a 6 stage restore method

1 – delete and re-create storage partition (I use HIRENS boot CD with parted magic to do this as EXT2)
2 - Copy latest backup location to the SD card SYSTEM partition (use Windows)
3 - boot to XBMC and install backup add-on from the net
4 - restore XBMC from the SYSTEM partition that has he latest backup folder in it (copied in step 2)
5 - remove SD card, manually copy guisettings.xml and all other settings.xml files to their correct locations on the STORAGE partition.
6 - install SD and boot XBMC (now working)

There has to be a better way, at the moment i will be copying the whole partition to another card i wont be using so if i get a problem i can just "hard disk" copy both partitions back again.

This is aggravation as i have to remove the card to do this, however i will have to anyway to do a restore as above (6 part steps) and at least with a hard drive copy of the SD card i dont need to go looking for the settings.xml files....

ideas? (i find it interesting it copies all the data to backup, its just the restore that doesnt work).



RE: [Release] XBMC Backup - robweber - 2013-01-13

(2013-01-13, 03:01)SFX Group Wrote: BUG FOUND? (Raspberry PI and restore)
Hi

I know we have an issue with the GUISETTINGS.XML file not being restored, however this appears to the tip of a very large iceburg.

No settings.xml files are being restored when i do a restore.

I clear the STORAGE partition (corrupted again), run XBMC, install this backup add in, by this time ive already copied over the latest backup from my store to the SD card.

I select this to restore, it does everything (add-ons etc..), however none of the settings.xml files get copied over to the add-on directories, there all "not configured", however when checking the backup folder i can see the settings.xml files and they have the settings in them.

Why are they not getting copied back to the SD storage card OR are they and XBMC isn’t writing the file (same as the guisettings.xml)?

This created a huge problem, other than a 6 stage restore method

1 – delete and re-create storage partition (I use HIRENS boot CD with parted magic to do this as EXT2)
2 - Copy latest backup location to the SD card SYSTEM partition (use Windows)
3 - boot to XBMC and install backup add-on from the net
4 - restore XBMC from the SYSTEM partition that has he latest backup folder in it (copied in step 2)
5 - remove SD card, manually copy guisettings.xml and all other settings.xml files to their correct locations on the STORAGE partition.
6 - install SD and boot XBMC (now working)

There has to be a better way, at the moment i will be copying the whole partition to another card i wont be using so if i get a problem i can just "hard disk" copy both partitions back again.

This is aggravation as i have to remove the card to do this, however i will have to anyway to do a restore as above (6 part steps) and at least with a hard drive copy of the SD card i dont need to go looking for the settings.xml files....

ideas? (i find it interesting it copies all the data to backup, its just the restore that doesnt work).

Thanks for reporting your findings. Have you found any strange entries in your log file?

I've tried several things to recreate this (on a windows system) so I'm wondering if this is something specific to the RPi. If possible could someone else confirm or deny that this behavior is happening to them? Here is what I've tried:

1) Do a complete backup of all addons, addon data, thumbnails, config files, etc.
2) Change settings on multiple addons and reboot xbmc to make sure the new settings are in fact saved.
3) do a restore of addon data only from the backup
4) confirm that the addons now show the previous settings from the backup instead of the new one

These steps have worked 100%, the addon sent over the settings.xml file from the backup and updated the addon settings. I've also tried:

1) Do a complete backup of all addons, addon data, thumbnails, config files, etc.
2) Shutdown xbmc and erase the addon data directory for several addons
3) start xbmc and confirm settings are at defaults
4) restore addon data from backup
5) check addon settings to confirm they now have customized settings from backup

Again, in this case the addon data folders were recreated and xbmc registered the new settings.xml files from the backup. If I have time I will attempt to do these same steps on an Rpi system; however I'll need to re-install OpenELEC on mine as it is setup for emulator gaming at the moment. Any additional information here from other users, or log files would be appreciated as this appears to be working.


RE: [Release] XBMC Backup - SFX Group - 2013-01-13

Ive not had this issue on Windows, i think this is a RPI or at least the "bespoke hardware" problem....

What i do know is this, heres something i tested.

I have the GMAIL email add-on, it had no username or password setup, so via the share for xbmc i copied the settings.xml for this addon, then run it, that didnt work, however if i copy the settings.xml via the share then open the addon and configure it, the correct settings are there, then when i run its ok.

So appears to load the settings file at boot, and uses these EVEN if the settings file changes in the background. The only way i have found to correct this would be to remove the SD card and do it in another system then boot xbmc again.

Problem with that is i get permission issues reading the setings.xml i just copied (tried ubuntu with this).

So in the long run its easier to copy the whole SD card as a backup, i still use this backup software as i like to see all the files, however using it to restore is abit of a nightmare.

How i found this was the backup itself would not copy back the settings.xml file so was set to FLASH (where i got my backup from as a temp restore), however it backs up to a network, this is how i spotted this problem, i wanted to see why the settings file was not being put back as it should have done.



RE: [Release] XBMC Backup - robweber - 2013-01-14

(2013-01-13, 21:47)SFX Group Wrote: Ive not had this issue on Windows, i think this is a RPI or at least the "bespoke hardware" problem....

What i do know is this, heres something i tested.

I have the GMAIL email add-on, it had no username or password setup, so via the share for xbmc i copied the settings.xml for this addon, then run it, that didnt work, however if i copy the settings.xml via the share then open the addon and configure it, the correct settings are there, then when i run its ok.

So appears to load the settings file at boot, and uses these EVEN if the settings file changes in the background. The only way i have found to correct this would be to remove the SD card and do it in another system then boot xbmc again.

Problem with that is i get permission issues reading the setings.xml i just copied (tried ubuntu with this).

So in the long run its easier to copy the whole SD card as a backup, i still use this backup software as i like to see all the files, however using it to restore is abit of a nightmare.

How i found this was the backup itself would not copy back the settings.xml file so was set to FLASH (where i got my backup from as a temp restore), however it backs up to a network, this is how i spotted this problem, i wanted to see why the settings file was not being put back as it should have done.

I still haven't had time to boot up my Rpi and test any of the settings transfers, but I did want to address the results of the test you are doing.

Addons interface with the user settings via the xbmcaddon python library provided by xbmc. xbmc as an application must be reading in the addon settings when certain conditions have been met, ie you change one in the gui. Based on your testing it appears that simply replacing the settings.xml file in the addon directory does not trigger xbmc to re-read the user settings from this file. Opening the settings dialog probably does trigger this action which is why they show up correctly, and then the addon works as expected.

To get around this limitation the Backup addon calls the builtin function "UpdateLocalAddons" after every restore operation. This built in function goes through your local addon directories and registers all addons, including new ones, and refreshes their settings. So while it may appear in testing that manual copying of the settings.xml file requires a restart, or other means, to trigger xbmc to register the settings; this addon already does the registering for you via the builtin function.



RE: [Release] XBMC Backup - SFX Group - 2013-01-14

(2013-01-14, 03:36)robweber Wrote: To get around this limitation the Backup addon calls the builtin function "UpdateLocalAddons" after every restore operation.

The restore i did, doesnt seem to agree with this, although i fully understand what your saying, the outcome ive noticed is this "call" isnt doing what you are expecting it to do.

The backup restored all of my add-ons (as expected, i had none installed, it was wiped), however all of the settings where not there, the backup DID have the settings.xml file, however what ever reason this file did not get to the add-ons expected location to work.

I cant say if it copied it but didnt take, or weather it didnt copy them, i do however know if i copy the settings.xml back manually via the share then run the config the settings are there.

I will assist as possible if you come up with some testing.... i need to get a few more SD cards though Smile



RE: [Release] XBMC Backup - thebearnecessit - 2013-01-26

Hi thanks for making this addon.

I tried to use it today but it didn't work really.

I was wanting to backup everything from my current Frodo RC1 install, and restore it all into my new fresh frodo rc3 install.

Is that something that should be possible or is it nt recommended to use backupa nd restore on different versions?
also, i know this is maybe too of topic. but if i want to move everything from a frodo rc1 install toa frodo rc2 install can i just copy my "portable data" folder? or is that only really supposed to be portable on the same xbmc version?


RE: [Release] XBMC Backup - robweber - 2013-01-26

(2013-01-26, 01:08)thebearnecessit Wrote: Hi thanks for making this addon.

I tried to use it today but it didn't work really.

I was wanting to backup everything from my current Frodo RC1 install, and restore it all into my new fresh frodo rc3 install.

Is that something that should be possible or is it nt recommended to use backupa nd restore on different versions?
also, i know this is maybe too of topic. but if i want to move everything from a frodo rc1 install toa frodo rc2 install can i just copy my "portable data" folder? or is that only really supposed to be portable on the same xbmc version?

What you are saying should work, I guess what exactly did you try and what happened? It should be a pretty simple process to send the backup files, the on your new system restore them. Specifics regarding platform or error messages would be great too.

Regarding your question, you could just move the portable data folder, assuming you are running xbmc in portable mode. If not you'll have to move wherever the home folder is for your specific platform. That is essentially what this addon is doing, copying data from the user home directory so you can move it back later.


RE: [Release] XBMC Backup - vijayk416 - 2013-01-26

Hi Rob, I'm really appreciating this add-on, so thank you for putting your time into it.

Couple items:
1. When the config files are backed up, do any custom files get sent along too? I made a file according to this wiki to mount my nfs folders but it appears that the autostart.sh file that I had in my config folder was not backed up.

2. For application data backups, I had some hiccups moving from Eden to Frodo, so ultimately I just brought over my library and did clean installs on the add-ons. I think in the future that I'll be skipping the addon options and backing up the rest. Any thoughts on why add-on backups might be more challenging?

V


RE: [Release] XBMC Backup - robweber - 2013-01-27

(2013-01-26, 23:38)vijayk416 Wrote: Hi Rob, I'm really appreciating this add-on, so thank you for putting your time into it.

Couple items:
1. When the config files are backed up, do any custom files get sent along too? I made a file according to this wiki to mount my nfs folders but it appears that the autostart.sh file that I had in my config folder was not backed up.

2. For application data backups, I had some hiccups moving from Eden to Frodo, so ultimately I just brought over my library and did clean installs on the add-ons. I think in the future that I'll be skipping the addon options and backing up the rest. Any thoughts on why add-on backups might be more challenging?

V

Glad you are finding this useful.

1) "Config files" includes any .xml files in the special://home/userdata directory. Generally these are things like guisettings.xml, sources.xml, advancedsettings.xml. Where does the autostart.sh file you speak of go? It sounds like an OpenELEC type of thing. I am working on a way to backup non-xbmc directories for systems like OpenELEC, Right now I have all the details spec'd out on paper, but it is requiring some major rewrites to the core backup functions so it is taking some time.

2) When moving from two different XBMC versions (like Eden to Frodo) addon backups might be troublesome. The only reason being that many addons have dependencies that change from version to version; or the addons themselves become incompatible with certain versions. For instance many people are having trouble getting PseudoTV working on Frodo at the moment. Your idea of not moving the addons makes more sense in this case I think.


RE: [Release] XBMC Backup - vijayk416 - 2013-01-27

Thanks for the response. It appears I am a moron - forgot to leave you with the link for the autostart.sh file for mounting nfs:
http://wiki.openelec.tv/index.php?title=Mounting_network_shares

I put the file in the /storage/.config/ folder.


RE: [Release] XBMC Backup - robweber - 2013-01-28

(2013-01-27, 18:17)vijayk416 Wrote: Thanks for the response. It appears I am a moron - forgot to leave you with the link for the autostart.sh file for mounting nfs:
http://wiki.openelec.tv/index.php?title=Mounting_network_shares

I put the file in the /storage/.config/ folder.

No problem! Thanks for the link. I've done very little with OpenELEC but remembered something about an autostart.sh file being something you could create with that system. The /storage/.config directory is outside of the regular /storage/.xbmc folder structure, this is something you'll have to wait until "custom folders" are ready before you can back it up.

In general, this feature seems to be very much anticipated. I'll try to get a jump on getting it done as I think it will make people's lives much easier.


RE: [Release] XBMC Backup - robweber - 2013-01-29

As I've been promising for months, I finally have, what I think, is a good solution for the issue of non-xbmc directories for backup. I've pushed a very preliminary version of this for testing to a branch on GitHub. Any brave souls who wish to test it please do, and report back on if it is working.

https://github.com/robweber/xbmcbackup/tree/testing

A few notes:
  • For now only 1 custom directory, I will add 2-5 total once I know it is working correctly.
  • A hash is used to match the custom directory during restores. This is in case you change the backup path and try to restore from an earlier backup. User messages will inform you if this happens.
  • I have not tested Dropbox functionality with this yet, but in theory it should work as I'm using the same vfs system as before.

This is a big change to the core structure so I'm looking for any bugs/suggestions as you go through testing.


RE: [Release] XBMC Backup - nickshe89 - 2013-02-07

(2013-01-29, 21:25)robweber Wrote: As I've been promising for months, I finally have, what I think, is a good solution for the issue of non-xbmc directories for backup. I've pushed a very preliminary version of this for testing to a branch on GitHub. Any brave souls who wish to test it please do, and report back on if it is working.

https://github.com/robweber/xbmcbackup/tree/testing

A few notes:
  • For now only 1 custom directory, I will add 2-5 total once I know it is working correctly.
  • A hash is used to match the custom directory during restores. This is in case you change the backup path and try to restore from an earlier backup. User messages will inform you if this happens.
  • I have not tested Dropbox functionality with this yet, but in theory it should work as I'm using the same vfs system as before.

This is a big change to the core structure so I'm looking for any bugs/suggestions as you go through testing.

dropbox not working you want me pm you whit my log ?

thanks




RE: [Release] XBMC Backup - robweber - 2013-02-07

That would be great. Thanks for testing!