15 Configuration
Rob edited this page 2023-04-05 13:15:04 -05:00

These options are found in the Settings area of the addon and should be setup prior to using. Be aware that settings are visible based on the Kodi Settings Level set. Levels higher than Standard (Advanced or Expert) are designated next to that setting.

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.
  • Set Zip File Location - where to stage the zip file during backup or restore operations. This must be local to the device, no SMB or NFS shares or it will fail. Also make sure you don't set a location that is included in the backup. Use of the special protocol is allowed. Settings Level Expert
  • Backups to Keep - You can keep a set number of backups by setting the integer value of this setting greater than 0.
  • Ask Before Restoring Kodi UI Settings - by default saved UI settings will be restored automatically. Setting this to true will prompt you to confirm you want to restore these settings. Settings Level Advanced
  • Progress Display - the type of progress bar you want to display, or none if you don't want to see the progress of the backup.
  • Backup Suffix - appends a suffix to the end of each backup folder or zip filename. Settings Level Advanced
  • Verbose Logging - adds some additional information to the logs, off by default. Settings Level Expert

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.

Remote Directories

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 page for more info on how to setup file share strings correctly.
  • Dropbox - link the addon to your Dropbox account, see the Dropbox page for more info on this
  • Google Drive - link the addon to your Google Drive account, see the Google Drive page for more info on this. Note this option only exists on Leia (v18) and lower version of Kodi

Please Note: The Backup addon manages all files/folders under the chosen directory. It will read/write/delete files and folders from here as needed to create backups and keep your retention policies. If you add additional files and folders to this subdirectory you may experience issues. You are better off creating a separate directory for this addon within your chosen folder than choosing a folder with other information in it.

File Selection Options

When in Advanced Mode you can select files via a Simple or Advanced Editor. By default the simple editor lets you can select from common Kodi folders that you would like to be backed up. Both editors work off of a JSON config file stored in the addon_data folder. Below is a breakdown of the file selection options available. More information about Kodi file paths can be found on the wiki.

  • Addon Data - this is data saved by addons when changing their settings. The path is special://home/userdata/addon_data
  • Config Files - config files refer to a collection of files that Kodi uses for information. This includes the keymaps and peripheral_data, and library directories in the userdata folder. It also includes all the XML files in the root of the userdata directory such as sources.xml, guisettings.xml, favorites.xml, advancedsettings.xml and others. For a full list of files in this directory see the UserData folder wiki page
  • Database - these are the local Kodi SQLlite databases. Even if using the SQL database there are other DB files such as Addons.db that you would want in this folder. The path is special://home/userdata/Database
  • Game Saves (Leia+ Only) - this will backup the Game Saves directory if you are using RetroPlayer in Kodi. This is special://home/userdata/Savestates
  • Playlist - Playlists that are created in Kodi. The path is special://home/userdata/playlists
  • Profiles - Any files in the profiles folder. Keep in mind this currently includes all database, thumnail and config files in here. The path is special://home/userdata/profiles
  • Thumbnails/Fanart - the folder where all thumbnails and fanart is stored. The path is special://home/userdata/Thumbnails
  • User Addons - these are all the addon files located in the main Kodi addons folder. The path is special://home/addons

Additionally each backup will dump your current UI Settings to a special saved file called xbmcbackup.val. This is done through a JSON-RPC Settings.GetSettings call done at the time the backup is run.

Scheduling

The scheduler allows for automatic backups on a defined schedule. More information on this is found on the Scheduling page.

Custom Directories (Legacy)

If using Backup 1.5.0 or greater these have been moved to the Advanced Editor.

You can define custom directories that are not a part of your Kodi folder structure for backup. These create a "custom_hash" folder in your backup destination. The hash for these folders is very important. During a restore if the hash of the file path in Custom 1 does not match the hash in the restore folder it will not move the files. This is to prevent files from being restored to the wrong location in the event you change file paths in the addon settings. A dialog box will let you know if file paths do not match up.

Up to 2 Custom directories can be specified.