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] Backup (formerly XBMC Backup) - RomMon - 2017-04-11

Hi Rob,

I created the two files and compared them in notepad++ (using the compare plugin).
Using the logging option in putty I captured the output.

For Backup a Custom Directory: /storage/.config/ (some Add-ons put symlinks here, like TVheadend and lcdd (in LE8.0.1))

Backup:
  • (ssh using putty and enable logging)
  • unzip -t 201703111404.zip
  • (stop logging, and remove the unneeded lines)
  • in np++ with replace, remove the first part " testing: 201703111404/" and the last part " OK" (regex replace option: "^ testing: 201.[0-9]*[0-9]\/")
  • in np++ select lines to sort, sort using TextFX > TextFX Tools > Sort lines case insensitive (at column)

Default LibreELEC backup:
  • (ssh using putty and enable logging)
  • tar -tvf 20170311140207.tar
  • (stop logging)
  • in np++ search on lines staring with "drw" and remove these lines (regex replace option:"^drw.*\r\n")
  • in np++ remove "-rw-r--r-- root/root 696320 2016-12-26 19:52:48 storage/.kodi/" (^[l-]?r[w-]?[x-]?[r-]?[w-]?[x-]?[r-]?[w-]?[x-]? root/(root|video)[0-9,-, ,:,-]*storage/.kodi/)
  • in np++ remove "-rw-r--r-- root/root 696320 2016-12-26 19:52:48 storage/" (^[l-]?r[w-]?[x-]?[r-]?[w-]?[x-]?[r-]?[w-]?[x-]? root/(root|video)[0-9,-, ,:,-]*storage/)
  • in np++ sort using TextFX > TextFX Tools > Sort lines case insensitive (at column)

Open the two files in np++ and compare using Plugins > Compare


RE: [Release] Backup (formerly XBMC Backup) - CiNcH - 2017-04-13

Quote:Not sure what you mean here - is the customized menu specific to a certain skin?
I use the default Estuary Skin in Kodi 17.1

The main menu is customizable under Settings > Skin settings > Main menu items.

I always have 'Addon Data' enabled in Backup. Estuary does back up the settings.xml which indeed contains the customized menu, e.g.:
Code:
<setting id="HomeMenuNoPicturesButton" type="bool">false</setting>
<setting id="HomeMenuNoProgramsButton" type="bool">false</setting>
<setting id="HomeMenuNoMusicVideoButton" type="bool">true</setting>
<setting id="hide_mediaflags" type="bool">false</setting>
<setting id="HomeMenuNoVideosButton" type="bool">true</setting>
But for some reason, it doesn't get restored.


RE: [Release] Backup (formerly XBMC Backup) - CiNcH - 2017-04-13

May it be that the file is restored, but when I close Kodi, it is overwritten again with the initial settings?


RE: [Release] Backup (formerly XBMC Backup) - RomMon - 2017-04-14

Hi Rob,

I found the reason for the missing files, and now do see that the orignal symlinks not restored as symlinks, but the file the symlink was pointing to.
Missing files:
During restore I only configured a path pointing to the location of the backup I wanted to restore (e.g. /var/media/sda/sda1-usb-WDC_WD25_00KS-00/restore), and left the other settings default.
So with e.g. 'Addon Data', 'Thubmnails/Fanart/', the two custom directories unselected. I mistakenly assumed that it will just restore the whole file, independent of the current file selection configuration.

Maybe you can make a note of this on you github site?: https://github.com/robweber/xbmcbackup/tree/krypton#restores

Symlinks:
Now that I restored the missing parts I do see that indeed the original symlinks are not restored as symlinks, but just the file the symlink was pointing to.
E.g.:

Code:
OpenELEC:~/.config/system.d/kodi.target.wants # ls -la
total 3
drwxr-xr-x    2 root     root          1024 Apr 14 22:31 .
drwxr-xr-x    4 root     root          1024 Apr 14 22:31 ..
-rw-r--r--    1 root     root           309 Apr 14 22:31 service.multimedia.tvheadend.service

Code:
OpenELEC:~/.config/system.d # ls -la
<snip>
-rw-r--r--    1 root     root           309 Apr 14 22:31 service.multimedia.tvheadend.service
OpenELEC:~/.config/system.d #

Edit (2017-04-14): updated my original post, by striking through the parts that are ok now.


Quick and dirty backup/restore - orhankur - 2017-04-19

I was using Openelec 8.0.1 on RPi but my system got corrupt for some reason and Openelec started to take up to 7-8 minutes to boot, if at all. I had a fairly large video/music library (about 1,500 movies, 140 TV shows and an inordinate number of music albums) and I did not want to rescan them after a fresh installation. My previous experience showed that the export and subsequent restore of the video library was extremely time consuming and not always successful.

So, here is what I did:

1) I copied the following directories and files from Userdata to one of my attached USB disks
Database
keymaps
peripheral_data
favourites.xml
guisettings.xml
profiles.xml
sources.xml

2) I did a fresh install of not OpenElec but LibreElec
3) I copied over the above directories and files from the USB disk to Userdata directory
4) Rebooted
All my movies and TV shows reappeared after reboot. This procedure took me about 3 minutes. Previously, an export/import of video library took more than 24 hours.

I hope this is helpful.


RE: [Release] Backup (formerly XBMC Backup) - schwang - 2017-04-22

Hi,

I want to do a fresh kodi install. I want to get rid of a custom build I'm using and go with a standard skin. I did a backup and my question is that if i delete kodi and do a fresh install, then use restore, will it restore the custom build? Or will it be the standard kodi skin?


RE: [Release] Backup (formerly XBMC Backup) - mixpc - 2017-04-23

Hi robweber and all,

First, I must say I consider this add-on a great piece of software and of inmense utility. Having said that, I have noticed that, as a user has pointed out before (reply in post 1482), it seems there is something not working properly regarding Dropbox backup, at least when choosing a zipped backup.

In my setting Kodi 17.1 on Raspbian April release (Kernel 4.4) on a Raspberry Pi 3, no tweakings at all but Raspbian and Kodi releases as-it-is. Add-on is configured by following the instructions in
https://github.com/robweber/xbmcbackup/tree/krypton#using-dropbox
and
https://github.com/robweber/xbmcbackup/blob/master/README.md
which are the same regarding "Using Dropbox"
So I created the app (key and secret well-typed), checked the url in Kodi's log, opened it in a browser and only then clicked Ok in the Kodi popup window (which had remained open).

Unzipped backups work perfectly well. However, it is a task that takes like a lot of time to complete 4h27m in my latest test (see log below).

Now, in zipped backups, when I click a manual backup, the add-on starts doing its job (top shows high CPU kodi.bin use as well), gathers all contents, zips them (it is all way faster) and after seemingly uploading for a few minutes the following pop-up message is displayed:

Write Error Detected
The destination may not be writeable
Zip archive could not be copied

As you can read, I chose for the backup to be zipped.

Please, find the log below. I have run several tests already before posting, by the way. You can see the 5am scheduled test being ok and the manually-run 10.44am test. The messsage in the log

Code:
10:46:04.356 T:1946181632  NOTICE: Samba is idle. Closing the remaining connections

is they only clue I can think of.

Anyway, here it is:

Code:
05:00:00.403 T:1584395184  NOTICE: script.xbmcbackup-1.0.9: token:1kd8k4jd7j3h8d7x:4kr9fu75mk21jd7c
05:00:00.953 T:1584395184  NOTICE: script.xbmcbackup-1.0.9: {u'referral_link': u'https://db.tt/p09o8h5xf3, u'display_name': u'MYFULLNAME', u'uid': 1234567, u'locale': u'en', u'email_verified': True, u'email': u'[email protected]', u'is_paired': False, u'team': None, u'name_details': {u'familiar_name': u'FirstName', u'surname': u'LastName', u'given_name': u'FirstName'}, u'country': u'US', u'quota_info': {u'datastorUS': 0, u'shared': 1234567890, u'quota': 12345612345X, u'normal': 1234566766L}}
05:00:00.953 T:1584395184  NOTICE: script.xbmcbackup-1.0.9: Starting
05:00:00.954 T:1584395184  NOTICE: script.xbmcbackup-1.0.9: Local Dir: /home/pi/.kodi/
05:00:00.954 T:1584395184  NOTICE: script.xbmcbackup-1.0.9: Remote Dir: /201704230500/
05:00:00.961 T:1584395184  NOTICE: script.xbmcbackup-1.0.9: Mode - Backup
05:00:04.890 T:1584395184  NOTICE: script.xbmcbackup-1.0.9: Creating FilUS List
05:00:07.616 T:1584395184  NOTICE: script.xbmcbackup-1.0.9: Writing filUS to: /201704230500/
05:00:07.616 T:1584395184  NOTICE: script.xbmcbackup-1.0.9: Source: /home/pi/.kodi/
(manually introduced space by me)
09:27:05.435 T:1584395184  NOTICE: script.xbmcbackup-1.0.9: scheduler will run again on 04-24-2017 05:00
(manually introduced space by me)
10:44:40.962 T:1321202608  NOTICE: script.xbmcbackup-1.0.9: token:1kd8k4jd7j3h8d7x:4kr9fu75mk21jd7c
10:44:41.517 T:1321202608  NOTICE: script.xbmcbackup-1.0.9: {u'referral_link': u'https://db.tt/p09o8h5xf3, u'display_name': u'MYFULLNAME', u'uid': 1234567, u'locale': u'en', u'email_verified': True, u'email': u'[email protected]', u'is_paired': False, u'team': None, u'name_details': {u'familiar_name': u'FirstName', u'surname': u'LastName', u'given_name': u'FirstName'}, u'country': u'US', u'quota_info': {u'datastorUS': 0, u'shared': 1234567890, u'quota': 12345612345X, u'normal': 8878011159L}}
10:44:41.517 T:1321202608  NOTICE: script.xbmcbackup-1.0.9: Starting
10:45:24.380 T:1321202608  NOTICE: script.xbmcbackup-1.0.9: token:1kd8k4jd7j3h8d7x:4kr9fu75mk21jd7c
10:45:24.902 T:1321202608  NOTICE: script.xbmcbackup-1.0.9: {u'referral_link': u'https://db.tt/p09o8h5xf3, u'display_name': u'MYFULLNAME', u'uid': 1234567, u'locale': u'en', u'email_verified': True, u'email': u'[email protected]', u'is_paired': False, u'team': None, u'name_details': {u'familiar_name': u'FirstName', u'surname': u'LastName', u'given_name': u'FirstName'}, u'country': u'US', u'quota_info': {u'datastorUS': 0, u'shared': 1234567890, u'quota': 12345612345X, u'normal': 8878011159L}}
10:45:24.902 T:1321202608  NOTICE: script.xbmcbackup-1.0.9: Starting
10:45:24.903 T:1321202608  NOTICE: script.xbmcbackup-1.0.9: Local Dir: /home/pi/.kodi/
10:45:24.904 T:1321202608  NOTICE: script.xbmcbackup-1.0.9: Remote Dir: 201704231045/
10:45:24.916 T:1321202608  NOTICE: script.xbmcbackup-1.0.9: Mode - Backup
10:45:24.920 T:1321202608  NOTICE: script.xbmcbackup-1.0.9: Creating FilUS List
10:45:27.538 T:1321202608  NOTICE: script.xbmcbackup-1.0.9: Writing filUS to: 201704231045/
10:45:27.539 T:1321202608  NOTICE: script.xbmcbackup-1.0.9: Source: /home/pi/.kodi/
10:46:04.356 T:1946181632  NOTICE: Samba is idle. Closing the remaining connections
10:50:14.979 T:1321202608  NOTICE: script.xbmcbackup-1.0.9: Writing filUS to: /
10:50:14.987 T:1321202608  NOTICE: script.xbmcbackup-1.0.9: Source: /home/pi/.kodi/temp/

Thought you might be interested in this case. If you need anything else, please, just write back.

Regards,

BTW, I am not assuming there is anything wrong with your code, please. I appreciate your coding, coding time and coding skills.

Edit: Just as an addition, the folder with the timestamp name in my kodi app is not created. Whereas the same folder is actually created when choosing the unzipped backup.


RE: [Release] Backup (formerly XBMC Backup) - freekdl - 2017-04-24

Is this add-on supposed to copy custom menu's and submenu's? I'm trying to make a backup on a Macbook and restoring it on an android box running LibreELEC. They both run Kodi 17.1 but when I try to restore on LibreELEC I get a message that I'm trying to restore a different version. I click yes and it copies all the files (takes about 10 minutes), after that I get an error message that the skin couldn't be copied because files are missing. I had custom backgrounds on the macbook in various folders on my hard drive which I didn't add as custom folders in the add-on options, could this be the only problem or is this add-on just not working cross platform? Thanks in advance for any information


[Release] Backup (formerly XBMC Backup) - ed_davidson - 2017-04-25

It's trying to restore the skin that you had on the other build but it's not enabled. Enable or install the skin first then it will work. Pull the power or force close after the restore.


RE: [Release] Backup (formerly XBMC Backup) - thecubasekid - 2017-04-26

Just though I would say Thanks! for this great add-on. I had been happily backing up manually copying user-data and addons folder between media centers when I had window HTPC and several ATV1 running OSMC, but since I replaced these with cheap android boxes it wouldn't work, always it would not recognize guisettings.xml and create a new one so i had to do lots of config in my skin, and it never seemed to recognize cached thumbnails so I had to scroll through thousands of movies and artists/albums forcing re-cache, bloating my thumbnail folder.

your add-on is working great with both Kodi and SPMC, both using MySQL on remote server as DB, backing up to and restoring from SMB network share, and is much faster than i expected.

Please keep up the outstanding work!


RE: [Release] Backup (formerly XBMC Backup) - Icarium - 2017-06-07

(2017-04-06, 17:53)robweber Wrote:
(2017-04-06, 16:58)newbz0324 Wrote: I have tried various times by following your step by step instructions for both dropbox and google drive but for some odd reason cannot get through to where it will give me an authorization code to be able to authorize for back up. I can only think that I am of course either missing a step or doing something wrong. As my name can give you a hint I am new to doing this so I hope I can get some help.

Are you following these instructions? They are the most current. The basic process is make sure your either Google or Dropbox IDs are entered correctly in the addon settings, and then hit Authorize. You should see the tinyurl that you need to enter in a browser (can be on the same computer if you can minimize Kodi without closing the dialog). Once you go through the authorization process hit OK on the dialog in Kodi.

Hi Im a novive noob aldo having trouble. I want to back up my system to dropbox and also my watched status, so can sync with another machine.at different location. Got back up to a usb , but the drop0box option seems cleaner, but have problem on dropbox and with syncying watchedlist to.dropbox as well. Have created App and input the ids and secret from dropbox, into bsck up, but how do i press authorise, cannot see a button or pop up. Pressing ok simply takes me out after saving and again nothing appears.

On watchedlist when pressing for dropbox authorisation i get a api message, refet to log. Before delving into that im running on jarvis 16.1. Would this have to do with this libreelec updates taking place last year which dont quite understand anyway. Did the final jarvis release contain libre 7.00 or above which read seems important for various changes occuring in krypton ? Edit now know it didnt so only krypton or flmc fork Huh, which questionable from what ive read.

thanks for help, primary school i knowNod


RE: [Release] Backup (formerly XBMC Backup) - zorro2222 - 2017-06-11

When restoring from the archive

Code:
13:03:59.812 T:11796  NOTICE: script.xbmcbackup-1.0.9: Starting
13:04:01.731 T:11796  NOTICE: script.xbmcbackup-1.0.9: Local Dir: C:/Users/AGER/AppData/Roaming/Kodi/
13:04:01.732 T:11796  NOTICE: script.xbmcbackup-1.0.9: Remote Dir: D:/kinozal/
13:04:01.734 T:11796  NOTICE: script.xbmcbackup-1.0.9: Mode - Restore
13:04:01.734 T:11796  NOTICE: script.xbmcbackup-1.0.9: copying zip file: 201706111214.zip
13:04:01.734 T:11796  NOTICE: script.xbmcbackup-1.0.9: Writing files to: C:/Users/AGER/AppData/Roaming/Kodi/cache/
13:04:01.734 T:11796  NOTICE: script.xbmcbackup-1.0.9: Source: D:/kinozal/
13:04:15.233 T:11796  NOTICE: script.xbmcbackup-1.0.9: extracting zip archive
13:04:47.101 T:11796   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.TypeError'>
                                            Error Contents: descriptor 'ok' requires a 'xbmcgui.Dialog' object but received a 'unicode'
                                            Traceback (most recent call last):
                                              File "C:\Users\AGER\AppData\Roaming\Kodi\addons\script.xbmcbackup\default.py", line 73, in <module>
                                                backup.run(mode)
                                              File "C:\Users\AGER\AppData\Roaming\Kodi\addons\script.xbmcbackup\resources\lib\backup.py", line 319, in run
                                                xbmcgui.Dialog.ok(utils.getString(30010),utils.getString(30101))
                                            TypeError: descriptor 'ok' requires a 'xbmcgui.Dialog' object but received a 'unicode'
                                            -->End of Python script error report<--



RE: [Release] Backup (formerly XBMC Backup) - Karellen - 2017-06-11

@zorro2222

Rather than throwing a bit of code at us, could you instead describe what the problem is, and post the FULL debug log.

Better still, follow the posting guidelines here... https://forum.kodi.tv/showthread.php?tid=42708&pid=1707470#pid1707470


RE: [Release] Backup (formerly XBMC Backup) - zorro2222 - 2017-06-11

(2017-06-11, 12:13)Karellen Wrote: @zorro2222

Rather than throwing a bit of code at us, could you instead describe what the problem is, and post the FULL debug log.

Better still, follow the posting guidelines here... https://forum.kodi.tv/showthread.php?tid=42708&pid=1707470#pid1707470

Kodi 17.3
windows 10 64 bit
RAM 16 GB

When you restore from the archive, an error occurs

https://pastebin.com/hcBrGrfC
@Karellen - 2x logs removed



watch gallery



RE: [Release] Backup (formerly XBMC Backup) - Karellen - 2017-06-11

@zorro2222

We do not allow logs to be pasted directly into this forum. Use a pastebin site.

I have removed both your logs.