Git Product home page Git Product logo

xbmcbackup's Introduction

Backup Addon

Kodi Version Total Downloads Build Status License PEP8

About

I've had to recover my database, thumbnails, and source configuration enough times that I just wanted a quick easy way to back them up. That is what this addon is meant to do.

Running the Program

Running the program will allow you to select Backup or Restore as a running mode. Selecting Backup will push files to your remote store using the addon settings you defined. Selecting Restore will give you a list of restore points currently in your remote destination. Selecting one will pull the files matching your selection criteria from the restore point to your local Kodi folders.

For more specific information please check out the wiki on Github for this project. Advanced descriptions for the following are all there:

Attributions

Icon files from Open Iconic — www.useiconic.com/open

Contributing

If you're having issues with this addon there are two main places to look. The first is the addon thread on the Kodi Forums. This is where you can ask general questions regarding functionality. If you're having a legitimate issue, such as an error message, you can create an Issue for it in this repository.

Pull Requests are welcome if you want to dig around in the code to fix issues or add functionality. Please submit them using the usual workflow. Additionally you can help keep languages files up to date by visiting the Weblate page for this addon and updating untranslated strings. Changes to Weblate will automatically create PRs to this repository. This is a great way to contribute if you're not a coder!

xbmcbackup's People

Contributors

anontester avatar dersphere avatar finlay-mcaree avatar gade01 avatar github-actions[bot] avatar neohidra avatar oldium avatar rjclark99 avatar robweber avatar weblate avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xbmcbackup's Issues

[REQUEST] Backup tv and movies addon_data

Hi Rob,

I hope i'm not to late to request this but I had an idea. Since most users only want their favorites and library entries backed up, how about adding an option that only backs up certain addons like the list could be backup:
Istream script.module.universal (istream favs)
script.icechannel (Istream Library)
1Channel
TV online
SALTS
Super Favorites
etc, etc

Dropbox Python SDK certificate expiring

Hi,

I got the following email from Dropbox, warning me that some changes they are making will break the Kodi backup plugin. Can you tell me if this is planned to be fixed in a future release? I'm currently on version 1.0.6.

We're writing to you because our logs indicate that you have at least one Dropbox API app (mediacenter_kodi_backup) using an old version of the Python Core SDK, with an out of date certificate file.

The Dropbox Python Core SDK implements certificate pinning, based on a list of certificates included in the SDK, in order to help secure the connection to the Dropbox API servers.

On August 1st, 2016, the Dropbox API servers will be updated to use a new certificate, so you’ll need to update the version of the SDK used in your app to match. The latest version of the Python Core SDK already contains the updated certificate file:

https://www.dropbox.com/developers-v1/core/sdks/python

You can refer to the CHANGELOG file included in the SDK for a list of changes.

Please update your app to use the latest SDK by 8/1/16 to ensure continued access to the Dropbox API.

Thanks!

Thumbnails backup oversight

I have found a bug (or more likely and oversight)...

When selecting NOT to backup the thumbnails/fanart but enabling Profile backup, it backups the thumbnails/fanart for the profiles.

Also, when we don't backup thumbnails, it shouldn't backup TexturesXX.db

It would be nice to be able to compress (or at least package) backups

Since the entire backup contains about 15000 files for me and Box tries to sync every single one of them every time, it's a bit annoying to have so many different files.

But regardless of that, imho it's a bit cleaner as well and it helps save diskspace a little bit. It's not a huge change but the backup went down from 1.2GB to 1.1GB on my machine.

Backup fails, leaves zip file in temp

So this was running fine for the past, no idea, since I have it. No issues whatsoever. I keep a 7 day roll and 1/31 was the last successful backup. It leaves xbmc_backup_temp.zip in the temp file (by the way, it is now kodi ;) and that's it. No error message, it just fails.

The ZIP file seems to be broken (cannot open it using windows, I have to use 7zip). It only contains 2 folders and is 250 MB. Normale backup for me is 650 MB so it crashes during creation (I am guessing). That it fails on 2/1 (new month shock?) could be a coincidence. Looking thru my 7 day windows, it did sort of failed a few days before (size of ZIP was 160 MB vs 650 normale range) but the ZIP made it to storage. Manual or scheduled right now does nothing besides leave a ZIP in the temp folder...

Comparing what is in a working ZIP vs broken, it seems to crash backing up uderdata folder. The saltscache file did not make it.

Add Profiles Folder

Add support for the xbmc profiles folder. Add applicable settings and backup/restore options.

Possible Typo In Scheduler

I am not sure if thats a typo but on the add-on scheduler, there seems to be a confusion.

If I select to run back up every week, it doesn't ask me which day of the week.
If I select to run it every day, now it asks me which day. I think they should be vice versa.

zip backups get larger every backup

if I delete some backups it gets smaller again (deleted around the new year you can see).

-rwxr--r--. 1 username users  23G Dec 22 06:35 201412220500.zip
-rwxr--r--. 1 username users  27G Dec 29 06:44 201412290500.zip
-rwxr--r--. 1 username users  25K Jan  5 05:00 201501050500.zip
-rwxr--r--. 1 username users 3.8G Jan 12 05:16 201501120500.zip
-rwxr--r--. 1 username users 7.5G Jan 19 05:32 201501190500.zip
-rwxr--r--. 1 username users  12G Jan 26 05:51 201501260500.zip

Backing up to External MicroSD card

First, I have to admit that I'm a newbie to Kodi/XBMC. I have done extensive Google searches and I've found a few leads that might indicate a firmware problem? I have a rooted Android TV box (running 5.1.1), and when I try to run the XBMCbackup to my external SD card, I get a "Write Error Detected" popup indicationg that the destination may not be writeable. But I am able to write to it outside of Kodi using ES File Explorer. Is there any fix for this? I am running Kodi version 16.0... it just updated today.
Here is the link to my log: http://xbmclogs.com/pgmnfjibp

Open Settings Dialog

If the backup location is not filled in - default setting - stop the backup process and open the addon settings dialog so the user can finish setup before running.

Error connecting to "api.dropbox.com"

I'm getting the following error when trying to perform a backup do Dropbox:

22:02:34 T:2604586048  NOTICE: -->Python Interpreter Initialized<--
22:02:38 T:2604586048   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.RESTSocketError'>
                                            Error Contents: Error connecting to "api.dropbox.com": [Errno 0] _ssl.c:340: error:00000000:lib(0):func(0):reason(0)
                                            Traceback (most recent call last):
                                              File "/home/pi/.xbmc/addons/script.xbmcbackup/default.py", line 21, in <module>
                                                backup = XbmcBackup()
                                              File "/home/pi/.xbmc/addons/script.xbmcbackup/resources/lib/backup.py", line 32, in __init__
                                                self.configureRemote()
                                              File "/home/pi/.xbmc/addons/script.xbmcbackup/resources/lib/backup.py", line 45, in configureRemote
                                                self.remote_vfs = DropboxFileSystem("/")
                                              File "/home/pi/.xbmc/addons/script.xbmcbackup/resources/lib/vfs.py", line 71, in __init__
                                                self.setup()
                                              File "/home/pi/.xbmc/addons/script.xbmcbackup/resources/lib/vfs.py", line 83, in setup
                                                token = sess.obtain_request_token()
                                              File "/home/pi/.xbmc/addons/script.xbmcbackup/resources/lib/dropbox/session.py", line 176, in obtain_request_token
                                                response = self.rest_client.POST(url, headers=headers, params=params, raw_response=True)
                                              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 177, in request
                                                raise RESTSocketError(host, e)
                                            RESTSocketError: Error connecting to "api.dropbox.com": [Errno 0] _ssl.c:340: error:00000000:lib(0):func(0):reason(0)
                                            -->End of Python script error report<--

Any idea what the problem could be?

XBMC Version Check

Store the version of xbmc that was used to generate an archive file within the xbmcbackup.val file. This can then be used to compare to the running version during a restore and at least warn the user that some of the information may not be compatible. Nothing more than a "you might mess things up" message, but at least it would help prevent scenarios where things don't mesh properly - especially for addons.

Better error message

The remote path not found message should contain more information. The expected path name would be more helpful.

Link to Settings

Add a link to "Addon Settings" under the main "Backup","Restore" dialog popup.

Update to latest version

This is not really an issue but since I don't find no other way to contact the author directly I use this platform for my question:

I'm using raspbmc and have the xbmcbackup addon in the version 0.5.5 installed. Since I'd like to have my backups compressed I'd like to update the addon to the latest version (currently this is 0.5.8).

How can i "force" an update of the plugin? I haven't found no way in the GUI to do so and don't know how to do it via the SSH connection.

I'd really appreciate if you could give me some instructions on this.

Thanks a lot for the addon & best regards

out of space building compressed backup: need option to control location of temp.zip

IOError: (28, 'No space left on device')

A common use case is that you want to backup to a mounted HDD. This is typically the case when there is limited space. But if you select option for a compressed archive the script attempts to build the zip xbmc_backup_temp.zip on local storage ~/.kodi/temp which causes it to run out of space. In this case we need to be able to host the temporary files on the external HDD as well.

IOError: (28, 'No space left on device')

openelec 6.0.3/ kodi 15 on wetek device

Split files larger than 4GB

I keep my backups on a local disk formatted in FAT32, but my backup files are already too large to be written in the disk, it returns write error.
It would be useful an option that automatically split files larger than 4GB.

Easier Dropbox authentification

I was wondering whether there is a way to get Dropbox (and other cloud services) to work easier, without having to create an own app and typing in key and secret.

Incremental backups

I just backed up my setup and it took around 3 hours, since it had to upload everything to dropbox. So I thought that incremental backups which only back up changed or new files would be nice, so the backup does not take that much time.

Gotham Changes

Following the Gotham Python changes thread (http://forum.xbmc.org/showthread.php?tid=173943) the following enhancements can be made as a result of changes to the xbmc python modules:

Addition of a background progress dialog during backups (maybe only if used with scheduler?)

Add autoclose to yesno dialog prompts

Use the dialog.notify() methods instead of the executebuiltin() function currently in use

EXCEPTION: Unknown exception thrown from the call "read"

Today I got this error while trying to make a backup.
(Kodi 15.2 with OpenELEC 6.0.0 on Wetek Play.)

20:17:22 T:2424013888 NOTICE: -->Python Interpreter Initialized<--
20:17:24 T:2424013888 NOTICE: script.xbmcbackup-1.0.6: Starte
20:17:24 T:2424013888 NOTICE: script.xbmcbackup-1.0.6: Lokales Verzeichnis: /storage/.kodi/
20:17:24 T:2424013888 NOTICE: script.xbmcbackup-1.0.6: Entferntes Verzeichnis: 201511112017/
20:17:24 T:2424013888 NOTICE: script.xbmcbackup-1.0.6: Modus - Sichern
20:17:24 T:2424013888 NOTICE: script.xbmcbackup-1.0.6: Dateiliste wird erzeugt
20:17:29 T:2424013888 NOTICE: script.xbmcbackup-1.0.6: Writing files to: 201511112017/
20:17:29 T:2424013888 NOTICE: script.xbmcbackup-1.0.6: Source: /storage/.kodi/
20:29:27 T:2424013888 ERROR: EXCEPTION: Unknown exception thrown from the call "read"
20:29:27 T:2424013888 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.RuntimeError'>
Error Contents: Unknown exception thrown from the call "read"
Traceback (most recent call last):
File "/storage/.kodi/addons/script.xbmcbackup/default.py", line 73, in
backup.run(mode)
File "/storage/.kodi/addons/script.xbmcbackup/resources/lib/backup.py", line 256, in run
filesCopied = self.backupFiles(fileGroup['files'],self.xbmc_vfs,self.remote_vfs)
File "/storage/.kodi/addons/script.xbmcbackup/resources/lib/backup.py", line 482, in backupFiles
wroteFile = dest.put(aFile,dest.root_path + aFile[len(source.root_path):])
File "/storage/.kodi/addons/script.xbmcbackup/resources/lib/vfs.py", line 97, in put
self.zip.writestr(utils.encode(dest),aFile.read())
RuntimeError: Unknown exception thrown from the call "read"
-->End of Python script error report<--

Validate Path Function

Just discovered the xbmc.validatePath(...) function for converting windows/linux slashes to the correct formatting. Although the addon seems to work regardless of this it may be useful for simple path checking.

How to "Check log for Dropbox authorize URL" on non-jailbroken iOS

I'm trying to import my Kodi settings to Kodi on iOS. I don't want to have to configure all the settings on the iOS device manually.

I used Backup on my main Kodi machine to create a backup to Dropbox. This worked fine, after jumping through the hoop of creating a Dropbox developer app and entering its key and secret.

Now, trying to restore that backup in Kodi on the iOS device, I'm unsure how this is meant to work. It says "Check log for Dropbox authorize URL / Click OK when authorized". This was easy enough to do on a computer, but how would I check the Kodi log on a non-jailbroken iOS 9.3 device? I've installed the "Log Viewer for Kodi" add-on, but of course I cannot launch it without first clicking Backup's OK button. I cannot find any place in iTunes or iFunBox where I can see any Kodi settings files or logs.

Backup fails if using compressiong and thumbnails/fanart

My backups are quite large, the latest 3.8GB, but when I try to use the backup compression option the backup fails and the following errors are generated in the log:

http://xbmclogs.com/pycw8uz1t

Since testing initially I have worked out that compression backup only fails if I have thumbnails/fanart selected, if I deselect thumbnails/fanart and leave everything else selected apart from custom dirs it works just fine. I run Kodi on an Nvidia Shield with 500GB HDD so there should be no issue with space.

Cloning an XBMC tv-box

Dear Rob

Your add-on is really helpful. I bought two tv-boxes running XBMC in Linux version and i fully configured the one box (skin,view types, sources, settings, subs, etc). The only problem is that on my restore on the new device not everything was complete restored. I mean the skin, skin settings, xbmc settings, view types, master password, custom backround etc. The only thing that restored properly was the repos and addons.

Is there a possible method to just clone the configured device exactly as it is in the new one?

I have tried 1 method but didn't work.

  1. I selected custom folders (and put the path /root to backup the complete device together with the other options) but with no result. Actually the backup didn't even started.

Can you help me to completely restore my backup to the new device with all my settings and skins etc?

Thanking you in advance
Nic

Rotate Backups

Give the users the option (if they wish) to keep a set amount of backups in the backup directory. The addon would check for the total number of folders after each backup and delete the oldest of these.

scheduler.py error

Hi,

I'm using OE 3.2 and I'm getting a scheduler.py error on OE startup, and XBMC Backup scheduled backups don't work. This has been goin for some time now (since a couple of OE versions back - don't remember exactly from which one). The error is not shown when the XBMC Backup scheduled backups are disabled, so it's the plugins error.

Best regards
Szafran

custom folders are not backed up

Hi,

nice program. The issue I have, ist that the custom folders are empty on the backup device. There are entries in the log about them:

xbmc.log :
15:45:22 T:2853172288 NOTICE: script.xbmcbackup: Starte
15:45:22 T:2853172288 NOTICE: script.xbmcbackup: Lokales Verzeichnis: /home/pi/.xbmc/
15:45:22 T:2853172288 NOTICE: script.xbmcbackup: Entferntes Verzeichnis: /media/USB1/XBMC-Backup/20130622/
15:45:22 T:2853172288 NOTICE: script.xbmcbackup: Modus - Sichern
15:45:22 T:2853172288 NOTICE: script.xbmcbackup: Dateiliste wird erzeugt
15:45:49 T:2853172288 NOTICE: script.xbmcbackup: Writing files to: /media/USB1/XBMC-Backup/20130622/
15:45:49 T:2853172288 NOTICE: script.xbmcbackup: Source: /home/pi/.xbmc/
15:58:30 T:2853172288 NOTICE: script.xbmcbackup: Writing files to: /media/USB1/XBMC-Backup/20130622/custom_1b7e4bccf/
15:58:30 T:2853172288 NOTICE: script.xbmcbackup: Source: /home/pi/Playlists/
15:58:30 T:2853172288 NOTICE: script.xbmcbackup: Writing files to: /media/USB1/XBMC-Backup/20130622/custom_d56416a6/
15:58:31 T:2853172288 NOTICE: script.xbmcbackup: Source: /home/pi/bin/

But they are empty:

pi@raspbmc:~$ sudo ls -la /media/USB1/XBMC-Backup/20130622/custom_1b7e4bccf/
total 0
drwxrwxrwx 1 root root 0 Jun 22 15:45 .
drwxrwxrwx 1 root root 480 Jun 22 15:45 ..

pi@raspbmc:~$ sudo ls -la /media/USB1/XBMC-Backup/20130622/custom_d56416a6/
total 0
drwxrwxrwx 1 root root 0 Jun 22 15:45 .
drwxrwxrwx 1 root root 480 Jun 22 15:45 ..

Every user on the Systen can read the source files (i don't post all the filenames ... access rights are allwasy the same):

pi@raspbmc:~$ ls -l /home/pi/Playlists/
total 400
-rwxrwxr-x 1 pi audio 405 Jun 21 14:39 0_MRS.m3u

pi@raspbmc:~$ ls -l /home/pi/bin
total 48
-rwxr-xr-x 1 pi pi 2065 Jun 6 22:18 adebug.sh
-rwxr-xr-- 1 pi pi 347 Apr 25 10:44 cpu.sh
-rwxr-xr-- 1 pi pi 558 Jun 22 15:37 fix_guest_access.sh
-rwxr-xr-x 1 pi pi 18332 Feb 3 11:40 killall
-rwxr-xr-- 1 pi pi 83 Jun 22 15:41 reset_MPD.sh
-rwxr-xr-- 1 pi pi 223 Apr 26 15:04 rpu.sh
-rwxr-xr-- 1 pi pi 33 May 19 10:54 rw_boot.sh
-rwxr-xr-- 1 pi pi 901 May 13 20:46 sTest.sh

I use XBMC on a raspberry pi.

regards

ASCII codec can't encode character

ERROR: Error Contents: 'ascii' codec can't encode character u'\xe1' in position 28: ordinal not in range(128)
ERROR: Traceback (most recent call last):
File "/home/bran/.xbmc/addons/script.xbmcbackup/default.py", line 188, in 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)

This also shows up in the the log for all of my add-ons:
WARNING: CreateLoader - Unsupported protocol(addons) in addons://more/executable.tbn
WARNING: CreateLoader - Unsupported protocol(addons) in addons://more/executablefanart.jpg

Latin1 charset compatibility

I can't use your plugin because of an incompatibility with latin charset (see log below):

image

Do you have any idea about how to fix this ?

Backup Rotation Sort

From john.doe on xbmc forum:

Frodo version working well so far... except I've got it set to a max. of 5 backups, but it's making the newest backup then deleting it straight-away, instead of deleting the oldest one!
e.g. Deleting folder 20121031 instead of folder 20121026.

timeout hung file tranfers

spawn a new thread and monitor it for file transfers. this way they can be timed out after a waiting period in the event something prevents the transfer from completing. most likely this will only benefit the dropbox file system as the xbmc vfs seems to handle these types of events internally and return normally.

ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python

Trying to restore a backup using Backup Addon for Kodi using OpenElec OS. I get the following error message. Not sure what to do next to troubleshoot.


16:04:45` T:140174949750528  NOTICE: script.xbmcbackup-1.0.6: Starting
16:05:57 T:140174949750528  NOTICE: script.xbmcbackup-1.0.6: Local Dir: /storage/.kodi/
16:05:57 T:140174949750528  NOTICE: script.xbmcbackup-1.0.6: Remote Dir: /storage/
16:05:57 T:140174949750528  NOTICE: script.xbmcbackup-1.0.6: Mode - Restore
16:05:57 T:140174949750528  NOTICE: script.xbmcbackup-1.0.6: copying zip file: 201603212241.zip
16:05:57 T:140174949750528  NOTICE: script.xbmcbackup-1.0.6: Writing files to: /storage/.kodi/temp/
16:05:57 T:140174949750528  NOTICE: script.xbmcbackup-1.0.6: Source: /storage/
16:06:48 T:140174949750528  NOTICE: script.xbmcbackup-1.0.6: extracting zip archive
16:07:44 T:140174949750528   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                            Traceback (most recent call last):
                                              File "/storage/.kodi/addons/script.xbmcbackup/default.py", line 73, in <module>
                                                backup.run(mode)
                                              File "/storage/.kodi/addons/script.xbmcbackup/resources/lib/backup.py", line 319, in run
                                              File "/storage/.kodi/addons/script.xbmcbackup/resources/lib/utils.py", line 24, in `getSetting
[default.py.txt](https://github.com/robweber/xbmcbackup/files/189739/default.py.txt)
[backup.py.txt](https://github.com/robweber/xbmcbackup/files/189740/backup.py.txt)
[utils.py.txt](https://github.com/robweber/xbmcbackup/files/189741/utils.py.txt)


Calling addon from script

The method of calling this addon via json or through RunScript should be more automated.

  1. Make sure the addons runs with behavior consistent with the scheduler, ie progress displays.
  2. Restore should take an optional second argument for the restore file to use.
  3. Set some window properties (true/false) while running that other scripts can use to check the status of the backup/restore process.

Dropbox does not work for me

I use version 1.0.2 on Kodi on my Ouya and also tried version 0.6.0 on Xbmc on my PC.

I created a Dropbox app and entered the key and secret. Unfortunately when launching Backup and select backup, only an error message appears saying that there was a script error.

Is this caused due do me using version 1.0.2 and not 1.0.5? I installed it via the official kodi repository.

Would be nice, if someone can help me.

SUPER DANGEROUS

If you choose browse to directory and select a directory with other directories in it and also chooses a number of backups to keep, it will wipe out the other directories. I lost about 5 gigs of personal photos (for ever) and about 20 gig of video files without knowing it.

Make sure you only remove backup directories.

Thumbs redirection not working

If you have a thumbs redirection in advancedsettings.xml (the backupped one), xbmcbackup restores the thumbs to the standard folder, probably because xbmc doesn't know yet about the folder redirection, since it's in the advancedsettings.xml that you're going to restore. So what happens is that you have to manually move the thumbs directory to the custom location and restart xbmc. Something like a two-step restore (restore settings, restart, restore data) would fix it, I guess.

can't write to upnp server

Hi

I can backup on local filesystem but I can't manage to backup on upnp devices which are writeable btw.

I get this error message on GUI :

"The destination may not be writable
Zip archive could not be copied"

Here is extract of log file :

00:57:06 T:123145304526848 NOTICE: script.xbmcbackup-1.0.6: Source: /Users/ben/.kodi/temp/
00:57:06 T:123145304526848 DEBUG: script.xbmcbackup-1.0.6: Writing file: /Users/ben/.kodi/temp/201511010056.zip
00:57:06 T:123145304526848 INFO: Platinum [neptune.threads.posix]: NPT_PosixThread::NPT_PosixThread
00:57:06 T:123145303453696 INFO: Platinum [neptune.http]: requesting URL http://192.168.0.254:52424/service/ContentDirectory/control
00:57:06 T:123145303453696 INFO: Platinum [neptune.http]: calling connector (proxy:no) (http 1.1:yes) (url:http://192.168.0.254:52424/service/ContentDirectory/control)
00:57:06 T:123145303453696 INFO: Platinum [neptune.tls]: looking for a connection to reuse
00:57:06 T:123145303453696 INFO: Platinum [neptune.tls]: TLS connector will connect to 192.168.0.254:52424
00:57:06 T:123145303453696 INFO: Platinum [neptune.http]: got connection (reused: false)
00:57:06 T:123145303453696 INFO: Platinum [neptune.http]: sending body stream, 973 bytes
00:57:06 T:123145303453696 INFO: Platinum [platinum.media.server.didl]: Parsing Didl...
00:57:06 T:123145304526848 ERROR: CUPnPDirectory::GetResource - no items returned for object 0/1/sandisk 64go/201511010056.zip

Made the test from kodi 15.2 on mac and then same on kodi installed on android tv, both can't handle to write backup file on upnp server.

Am I doing something wrong ? known issue ? do you need more details ?

Thx for the job btw ;)

FTP Backup

Hello Rob i was wondering if there is a way i can use this addon with FTP. I have the following site with a backup on http://blythie.co.uk/FTP/ and when i use that as the path source to ONLY restore it doesnt work :/ any suggestions ?? :)

feature request: exclude directories option

would love to have the ability to exclude some directories (say for example 3 custom dir to exclude) or if not maybe a hint on where best to change this in the code? thanks!! :)

Feature Request: configurable temp folder

Hi,

it would be nice to choose the temp folder, because on my Wetek Play I only have 4GB as the main storage. My userdata is 1.5GB so there isn't much free space left to hold the temp backup as well.
Choosing my SD Card as the temp folder would be great.

With best regards,
der-htc.

Backup to google drive from 'script.xbmcbackup'

Hello,

I'm running the most up to date kodi on an amazon tv stick.

The problem I have is backing up to gdrive. I have followed the instructions precisely and it appears to be generating the zip file for backup transfer when it suddenly crashes kodi.

Log file details below (user specific details redacted from the copy and paste)

I only got as far as noticing the call to 'none type' but I'm not sure how to proceed with that or if that's the right place to start.

13:09:12 T:1663920824 NOTICE: Thread TCPServer start, auto delete: false
13:09:12 T:1656046728 NOTICE: -->Python Interpreter Initialized<--
13:09:12 T:1659040480 NOTICE: Previous line repeats 2 times.
13:09:12 T:1659040480 NOTICE: Thread JobWorker start, auto delete: true
13:09:12 T:1681990088 NOTICE: Thread LanguageInvoker start, auto delete: false
13:09:13 T:1651304200 NOTICE: -->Python Interpreter Initialized<--
13:09:13 T:1651303128 NOTICE: Previous line repeats 1 times.
13:09:13 T:1651303128 NOTICE: script.grab.fanart: Grab Fanart Service Started
13:09:15 T:1658838120 NOTICE: StorageServer Module loaded RUN
13:09:15 T:1658838120 NOTICE: StorageClient-2.5.4 Starting server
13:09:18 T:1661864744 NOTICE: -->Python Interpreter Initialized<--
13:09:19 T:1713042312 NOTICE: Previous line repeats 1 times.
13:09:19 T:1713042312 NOTICE: Thread BackgroundLoader start, auto delete: false
13:09:19 T:1711891248 NOTICE: Thread JobWorker start, auto delete: true
13:09:23 T:1712952720 NOTICE: Thread LanguageInvoker start, auto delete: false
13:09:23 T:1712952720 NOTICE: -->Python Interpreter Initialized<--
13:09:29 T:1712952720 ERROR: WARNING:root:[Errno 2] No usable temporary directory found in ['/tmp', '/var/tmp', '/usr/tmp', '/']
Traceback (most recent call last):
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.module.googleapi/lib/apiclient/discovery_cache/init.py", line 38, in autodetect
from . import file_cache
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.module.googleapi/lib/apiclient/discovery_cache/file_cache.py", line 132, in
cache = Cache(max_age=DISCOVERY_DOC_MAX_AGE)
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.module.googleapi/lib/apiclient/discovery_cache/file_cache.py", line 78, in init
self._file = os.path.join(tempfile.gettempdir(), FILENAME)
File "/home/jenkins/workspace/Android-ARM/tools/depends/xbmc-depends/arm-linux-androideabi-android-17/lib/python2.6/tempfile.py", line 254, in gettempdir
File "/home/jenkins/workspace/Android-ARM/tools/depends/xbmc-depends/arm-linux-androideabi-android-17/lib/python2.6/tempfile.py", line 201, in _get_default_tempdir
IOError: [Errno 2] No usable temporary directory found in ['/tmp', '/var/tmp', '/usr/tmp', '/']
13:09:29 T:1712952720 NOTICE: .
13:09:31 T:1712952720 NOTICE: GoogleDriveFile({u'mimeType': u'application/vnd.google-apps.folder', u'version': u'78097', u'appDataContents': False, u'labels': {u'restricted': False, u'starred': False, u'viewed': True, u'hidden': False, u'trashed': False}, u'explicitlyTrashed': False, u'etag': u'"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"', u'lastModifyingUserName': u'XXXXXXXX', u'writersCanShare': True, u'owners': [{u'emailAddress': u'XXXXXXXXXXXXXXXX', u'kind': u'drive#user', u'isAuthenticatedUser': True, u'displayName': u'XXXXXXXXXXXX', u'permissionId': u'XXXXXXXXXXXXXXXX'}], u'id': u'XXXXXXXXXXXXXXXX', u'lastModifyingUser': {u'emailAddress': u'XXXXXXXXXXXXXXXXXXXXXXXX', u'kind': u'drive#user', u'isAuthenticatedUser': True, u'displayName': u'Stephen Carey', u'permissionId': u'XXXXXXXXXXXXXXXXXXXXX'}, u'copyable': False, u'ownerNames': [u'Stephen Carey'], u'lastViewedByMeDate': u'2015-12-24T13:08:25.760Z', u'parents': [{u'isRoot': True, u'kind': u'drive#parentReference', u'id': u'XXXXXXXXXXXXXXXXX', u'selfLink': u'https://XXXXXXXXXXXXXXXXXXXXX', u'parentLink': u'https://www.XXXXXXXXXXXXXXXX'}], u'shared': False, u'editable': True, u'markedViewedByMeDate': u'1970-01-01T00:00:00.000Z', u'modifiedDate': u'2015-12-24T12:54:39.499Z', u'createdDate': u'2015-12-24T12:54:39.499Z', u'iconLink': u'https://ssl.gstatic.com/docs/doclist/images/icon_11_collection_list_1.png', u'kind': u'drive#file', u'alternateLink': u'https://XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX', u'title': u'Kodi Backup', u'modifiedByMeDate': u'2015-12-24T12:54:39.499Z', u'userPermission': {u'kind': u'drive#permission', u'etag': u'"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"', u'role': u'owner', u'type': u'user', u'id': u'me', u'selfLink': u'https://www.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'}, u'spaces': [u'drive'], u'quotaBytesUsed': u'0', u'selfLink': u'https://www.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'})
13:09:31 T:1712952720 NOTICE: script.xbmcbackup-1.0.6: Starting
13:10:54 T:1718633720 NOTICE: Thread LanguageInvoker start, auto delete: false
13:10:54 T:1718633720 NOTICE: -->Python Interpreter Initialized<--
13:10:59 T:1718633720 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: attribute of type 'NoneType' is not callable
Traceback (most recent call last):
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.xbmcbackup/default.py", line 37, in
backup = XbmcBackup()
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.xbmcbackup/resources/lib/backup.py", line 46, in init
self.configureRemote()
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.xbmcbackup/resources/lib/backup.py", line 62, in configureRemote
self.remote_vfs = GoogleDriveFilesystem('/Kodi Backup/')
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.xbmcbackup/resources/lib/vfs.py", line 292, in init
self.setup()
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.xbmcbackup/resources/lib/vfs.py", line 312, in setup
gauth.LoadCredentialsFile(xbmc.validatePath(xbmc.translatePath(utils.data_dir() + 'google_drive.dat')))
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.xbmcbackup/resources/lib/pydrive/auth.py", line 236, in LoadCredentialsFile
self.credentials = storage.get()
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.module.oauth2client/lib/oauth2client/client.py", line 372, in get
return self.locked_get()
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.module.oauth2client/lib/oauth2client/file.py", line 79, in locked_get
credentials = Credentials.new_from_json(content)
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.module.oauth2client/lib/oauth2client/client.py", line 290, in new_from_json
return from_json(s)
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.module.oauth2client/lib/oauth2client/client.py", line 622, in from_json
data['token_expiry'], EXPIRY_FORMAT)
TypeError: attribute of type 'NoneType' is not callable
-->End of Python script error report<--
13:14:06 T:1568347816 NOTICE: GL_VENDOR = Broadcom
13:14:06 T:1568347816 NOTICE: GL_RENDERER = VideoCore IV HW
13:14:06 T:1568347816 NOTICE: GL_VERSION = OpenGL ES 2.0
13:14:06 T:1568347816 NOTICE: GL_SHADING_LANGUAGE_VERSION = OpenGL ES GLSL ES 1.00
13:14:06 T:1568347816 NOTICE: GL_EXTENSIONS = GL_OES_compressed_ETC1_RGB8_texture GL_OES_compressed_paletted_texture GL_OES_texture_npot GL_OES_depth24 GL_OES_vertex_half_float GL_OES_EGL_image GL_OES_EGL_image_external GL_EXT_discard_framebuffer GL_OES_rgb8_rgba8 GL_OES_depth32 GL_OES_packed_depth_stencil GL_EXT_texture_format_BGRA8888 GL_EXT_debug_marker

writestr() got an unexpected keyword argument 'compress_type'

Any idea what might be causing this issue? Thanks.

18:18:31 T:4641013760  NOTICE: script.xbmcbackup-1.0.2: Starting
18:18:31 T:4641013760  NOTICE: script.xbmcbackup-1.0.2: Local Dir: /Users/hwilson/Library/Application Support/Kodi/
18:18:31 T:4641013760  NOTICE: script.xbmcbackup-1.0.2: Remote Dir: 201505141818/
18:18:31 T:4641013760  NOTICE: script.xbmcbackup-1.0.2: Mode - Backup
18:18:31 T:4641013760   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: writestr() got an unexpected keyword argument 'compress_type'
                                            Traceback (most recent call last):
                                              File "/Users/hwilson/Library/Application Support/Kodi/addons/script.xbmcbackup/default.py", line 69, in <module>
                                                backup.run(mode)
                                              File "/Users/hwilson/Library/Application Support/Kodi/addons/script.xbmcbackup/resources/lib/backup.py", line 157, in run
                                                writeCheck = self._createValidationFile()
                                              File "/Users/hwilson/Library/Application Support/Kodi/addons/script.xbmcbackup/resources/lib/backup.py", line 521, in _createValidationFile
                                                success = self.remote_vfs.put(xbmc.translatePath(utils.data_dir() + "xbmcbackup.val"),self.remote_vfs.root_path + "xbmcbackup.val")
                                              File "/Users/hwilson/Library/Application Support/Kodi/addons/script.xbmcbackup/resources/lib/vfs.py", line 100, in put
                                                self.zip.writestr(utils.encode(dest),aFile.read(),compress_type=zipfile.ZIP_DEFLATED)
                                            TypeError: writestr() got an unexpected keyword argument 'compress_type'
                                            -->End of Python script error report<--

Attach Date to Backup

Create a setting that will attach as backup date to the xbmc_backup folder name created when the script runs. This will also necessitate an option to allow the date to be chosen upon restore. Thanks to matt77303 for the idea

Update Addons

Found this (via the XBMC data sync addon) that will refresh all addons. Useful in the event of a restore operation so that the user does not have to reboot XBMC.

xbmc.executebuiltin('UpdateLocalAddons')

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.