Archive Plugins

Archive Plugins can be used to integrate Portal with various archive solutions. The plugin will be responsible for copying a set of files from Portal to an archive, and to restore the files again. An archive plugin will need to implement two methods: one method to archive a set of files, and one method to restore a set of files.

A full clone of the Portal FileSys archive plugin is available for reference at


class portal.generic.plugin_interfaces.IArchivePlugin

An archive plugin is a plugin that’s responsible for archiving and restoring files. All required methods must be implemented.

  • archive(file_sets, policy_uuid, job_id) - Plugin should archive all files in file_sets (from a single storage if

    multiple are available) and return the file_sets-list of files that were archived. I.e. in normal case if all files where archived should return file_sets without modifications.

  • restore(file_sets, policy_uuid) - Plugin should restore all files in file_sets, to a single storage if

    multiple are listed. The framework will handle the case where a file should be available in multiple locations after restore. Returns the file_sets-list or files that were restored, i.e. in normal case if all files where restored should return file_sets without modifications. If the restore fails, the plugin should raise an exception with an error message that will be shown in the admin user interface.

  • delete(file_sets, policy_uuid) - Plugin should delete the listed files from archive, and return the list

    of files that were deleted.

  • get_policies() - Return list of available storage policies for this plugin, in the simplest case a single

    value [ { ‘uuid’: “filesys”, ‘bulk_support’: False } ]

  • is_ready() - Should return True if and only if plugin is correctly configured and ready to

    archive/restore files. For example should check that archival system is available at the address set by the user in the plugins setup interface. This return value of this function is cached for performance reasons, so, a change from False to True or from True to False, can some seconds or few minutes until it has an effective impact on Portal UI.

Optional: * get_policy_constrains() - Return list of constraints related to a bulk policy.

  • file_sets - a list of portal.archive_framework.utils.FileSet objects



Remember to include roles for your plugin