Feature #2048
Replication of the backup lookups
100%
Subtasks
Associated revisions
Initial version of REST handler
Reference #2048
Adding support for retrieving lookup backups from the REST handler
Reference #2048
Migrating save to the REST handler
Reference #2048
Fixing issue where backups were not being persisted
Reference #2048
Consolidated the save functionality into the shared library
Reference #2048
History
#1 Updated by Luke Murphey about 7 years ago
- File lookup_editor.tgz added
#2 Updated by Luke Murphey about 7 years ago
Wondering if I could just whitelist the files:
http://docs.splunk.com/Documentation/Splunk/6.6.3/Admin/Distsearchconf#REPLICATION_WHITELIST_OPTIONS
#3 Updated by Luke Murphey about 7 years ago
The files are being stored in /etc/apps/lookup_editor/lookup_file_backups
#4 Updated by Luke Murphey about 7 years ago
I could handle this by using allowRestReplay from https://docs.splunk.com/Documentation/Splunk/6.6.3/Admin/Restmapconf:
allowRestReplay=[true|false] * POST/PUT/DELETE requests can be replayed on other nodes in the deployment. * This enables centralized management. * Turn on or off this feature. You can also control replay at each endpoint level. This feature is currently INTERNAL and should not be turned on witout consulting splunk support. * Defaults to false
#5 Updated by Luke Murphey about 7 years ago
This is available on 6.3.0+ per https://docs.splunk.com/Documentation/Splunk/6.3.0/Admin/restmapconf.
#7 Updated by Luke Murphey about 7 years ago
APIs that need to be converted:
- get_lookup_info: Get information about a lookup file (owner, size, etc.)
- get_lookup_backups_list: Get a list of the lookup file backups rendered as JSON.
- save: save the JSON contents to the lookup file (this is the only one that must be converted to support replication)
- get_original_lookup_file: provides the lookup file in a way to be downloaded by the browser.
- get_lookup_contents: Provides the contents of a lookup file as JSON.
#8 Updated by Luke Murphey about 7 years ago
This code could use some breaking up (not including the public functions above):
- Backups
- get_backup_files (getBackupFiles)
- get_backup_directory (getBackupDirectory)
- backup_lookup_file (backupLookupFile)
- Shortcuts
- append_if_not_none
- flatten_dict
- make_lookup_filename (makeLookupFilename)
- is_lookup_in_users_path (isLookupInUsersPath)
- convert_array_to_csv
- escape_filename (escapeFilename)
- is_file_name_valid
- Lookup
- force_lookup_replication
- getCapabilities4User
- resolve_lookup_filename
- get_kv_lookup
- get_lookup (signature changed)
- Controller specific
- render_error_json
#9 Updated by Luke Murphey about 7 years ago
- backup_lookup_file: function signature has changed (moved resolved_file_path)
#10 Updated by Luke Murphey about 7 years ago
I think I will need to break out the backups handler from the main handler so that allowRestReplay can be enabled only for backups.
#11 Updated by Luke Murphey about 7 years ago
- Get backups to work
- Clean up post_lookup_contents() which currently does too much and has to call lookupfiles directly
#12 Updated by Luke Murphey about 7 years ago
- Status changed from New to Closed