diff --git a/Beta-Instructions.md b/Beta-Instructions.md new file mode 100644 index 0000000..5dc9261 --- /dev/null +++ b/Beta-Instructions.md @@ -0,0 +1,81 @@ +These are instructions for the new Beta version of the Backup Addon. This is not in the official Kodi repo yet, but for the brave souls testing it here are some instructions. + +__Beware your old archive files created with previous versions of the Backup Addon are not compatible.__ + +### [Download Here](https://github.com/robweber/xbmcbackup/archive/krypton.zip)! + +## Overview + +In the current iteration of the Backup addon there were some very simple file selection dialogs, along with 2 custom directory options to choose from. Since everyone's setup is different this one size fits all approach to file management was not the best setup. + +Additionally restore operations were not very intuiative. You had to select the options you wanted in the addon settings ahead of doing the restore option. If you had different archives, with different files backed up, this was not ideal for trying to figure out what files were going to be restored. Traditional backup/restore programs allow you to select the files to restore *after* the backup achive had been examined. + +### What is different? + +The Beta version of the addon incorporates a new method of file selection. There is both a simple and advanced mode. The simple mode is just a pre-selected version of the advanced mode, so a description of it suffices for both. + +A json file is created that lists directories to be included in a group. Each group can have included or excluded directories. Additionally included directories can be recursed true/false. An example file for the simple pre-sets is below: + +``` +{ + "addons":{ + "root":"special://home/addons", + "dirs":[ + { + "type":"include", + "path":"special://home/addons", + "recurse":true + }, + { + "type":"exclude", + "path":"special://home/addons/packages" + } + ] + }, + "addon_data":{ + "root":"special://home/userdata/addon_data", + "dirs":[ + { + "type":"include", + "path":"special://home/userdata/addon_data", + "recurse":true + } + ] + } +} +``` + +Each directory group will create a folder within the backup for it's files. These are done separately, even if groups are pulling from the same folder. + +Also during the backup the file selections are recorded in the backup validation file. These are used on restore to restore directories that actually were included in the backup. + +## New Features + +### Advanced Editor + +As described above there is a Simple vs Advanced file selection feature in the settings area now. Simple is just like the old way, minus the custom directories option (I may add this back in). The Advanced editor will pop up a new series of dialog boxes. + +Adding a set will allow you to name a backup selection set and then set a root folder for inclusion. Because of how Kodi handles it's file browser I couldn't just let you browse the system carte blanche. You can either choose to select a folder within the "special://home" directory (default) or type your own path to start as the root. You can get as granular here as you want. Only selecting a specific addon to backup, or a specific sub folder. + +Once the set is added you can select it to edit it or delete it. Editing a set allows you to see the root folder and add exclusions. By default the root folder is recursed and all files/directories added. You can select a folders to exclude; adding as many exclusions as you want to trim the backup set to a selection you want. + +### Backups + +When backing up in either the Simple or Advanced file mode you'll get a similar result. The backup archive will create a series of folders, one for each backup set type. With the Simple mode each set is just one of the "on/off" selection boxes. The xbmcbackup.val file also contains more information regarding the settings and paths for that particular backup. + +### Restores + +Restores have been revamped. Previously they tried to restore files sort of in a "reverse backup" kind of way. Whatever you had selected in the file selection settings was attempted to be put back. This was not very intuitive and led to issues where maybe you didn't want all those files, or the backup you selected didn't contain them all (ie settings changed later). + +After selecting your backup you'll now get a Backup Set selection browser. This will show the name of each set in whatever backup you've chosen. This is a multi-selection box. You can select them all or just a particular one. Once selected the restore process will restore these files only. + +### Scripting + +Scripting works the exact same way as outlined in the [Scripting](https://github.com/robweber/xbmcbackup/wiki/Scripting) wiki page currently. The one addition is that you can pass in a "sets" parameter. This bypasses the set selection dialog. If you pass in a set name that does not exist in the archive, it is just ignored. An example restore call to restore the config and databases sets would look like the following: + +``` +{ "jsonrpc": "2.0", "method": "Addons.ExecuteAddon","params":{"addonid":"script.xbmcbackup","params":{"mode":"restore","archive":"000000000000","sets":"config|database"}}, "id": 1 } + +``` + +*Note the pipe (|) between each set name* \ No newline at end of file