updated README.md

This commit is contained in:
Rob Weber 2017-01-31 09:33:16 -06:00
parent fcafc77180
commit 87c638a0d6

View File

@ -5,16 +5,31 @@ I've had to recover my database, thumbnails, and source configuration enough tim
## Configuration
In the addon settings you can define a remote path for the destination of your Kodi files. Each backup will create a folder named in a YYYYMMDDHHmm format so you can create multiple backups. You can keep a set number of backups by setting the integer value of the Backups to Keep setting greater than 0.
These options are found in the Settings area of the addon and should be setup prior to using.
### General
These are general settings regarding how backups are performed, maintained, and displayed.
* Compress Archives - this will put the backup contents in a zip folder. See notes below regarding how this works in more detail.
* Backups to Keep - You can keep a set number of backups by setting the integer value of this setting greater than 0.
* Progress Display - the type of progress bar you want to display, or none if you don't want to see th progress of the backup.
If you choose to compress your backups there are a few things you need to be aware of. Compressing takes place on the server you are trying to backup and then only the archive is copied to the remote backup location. This means you must have sufficient space available to allow for creating the archive. When restoring a zipped archive the process is the same. It is first copied to your local storage, extracted, and the contents put to their correct locations. The archive is then deleted. Zipped and non-zipped backups can be mixed in the same archive folder.
On the Backup Selection page you can select which items from your user profile folder will be sent to the backup location. By default all are turned on except the Addon Data directory.
### Remote Directories
You can also define non-Kodi directories on your device. See "Custom Directories" for more information on how these are handled.
Here is where you setup the remote path the backup files will be copied to. Each backup will create a folder named in a YYYYMMDDHHmm format so you can create multiple backups. The options currently available are:
* Browse Path - just browse for a path that Kodi can see via the normal network browser.
* Type Path - similar to browsing but you type the full path, including "smb://" or "nfs://" protocols as appropriate. See the [Kodi file sharing](http://kodi.wiki/view/File_sharing) page for more info on how to setup file share strings correctly.
* Dropbox - link the addon to your Dropbox account, see more info below on this.
* Google Drive - link the addon to your Google Drive account, see more info below on this.
### File Selection Options
Here you can select the items from your user profile folder that will be sent to the backup location. By default all are turned on except the Addon Data directory. You can also define non-Kodi directories on your device. See "Custom Directories" for more information on how these are handled.
Here is a breakdown of the file selection options available in the settings. More information about Kodi file paths can be found on [the wiki](http://kodi.wiki/view/Special_protocol)
* User Addons - these are all the addon files located in the main Kodi addons folder. The path is special://home/addons
@ -55,13 +70,13 @@ When using the "Shutdown" function this will call Kodi's Shutdown method as defi
Using Dropbox as a storage target adds a few steps the first time you wish to run a backup. First you will need to sign-up for you own developer app key and secret by visiting https://www.dropbox.com/developers. Name your app whatever you want, and make it an "App Folder" type application. Your app can run in developer mode and you should never need to apply for production status. This is to get around Dropbox's rule not allow distribution of production key/secret pairs.
Once you have your app key and secret add them to the settings. Kodi Backup now needs to have permission to access your Dropbox account. When you see the prompt regarding the Dropbox URL Authorization DO NOT click OK. Check your Kodi log file for a line from "script.xbmcbackup" containing the authorization URL. Cut/paste this into a browser and click Allow. Once this is done you can click "OK" in Kodi and proceed as normal. Kodi Backup will cache the authorization code so you only have to do this once, or if you revoke the Dropbox permissions.
Once you have your app key and secret add them to the settings. Kodi Backup now needs to have permission to access your Dropbox account. Hit the _Authorize_ button to start this process. When you see the prompt regarding the Dropbox URL Authorization you'll need to type the TinyURL into a browser on your phone, tablet, or computer - **DO NOT click OK**. Once you authorize via the browser you can click OK in Kodi and proceed as normal. Kodi Backup will cache the authorization code so you only have to do this once, or if you revoke the Dropbox permissions.
## Using Google Drive
Using the Google Drive target is very similar to the Dropbox one. You must create a Google API project and authenticate your account via the id and secret. Instructions for enable the Google API for Google Drive can be found here (https://developers.google.com/drive/web/quickstart/quickstart-python). You'll need the client id and client secret generated for the addon settings. You only need to follow Step 1.
Once you have the client ID and Secret add them to the addon settings and run a backup. You'll get a notification that you need to enter your authorization code. Check your Kodi log file for a line from "script.xbmcbackup" containing the authorization URL. Cut/paste this into a browser and click Allow. Once this is done put the code from your browser into the pop-up dialog. The addon will cache these credentials so it should be a one-time authentication. From there the backup should start to run.
Once you have the client ID and Secret add them to the addon settings and click _Authorize_. You'll get a popup with a TinyURL to enter in a browser on your phone, tablet, or computer. Click OK and you'll see a notification to enter your authorization code. You'll get this code after authorizing the app via your browser. Put the code from your browser into the pop-up dialog. The addon will cache these credentials so it should be a one-time authentication unless you revoke Google Drive permissions.
## Scripting A Backup