Offline archive

Offline archive

The offline archive plugin allows you to move the original file of resources to an alternative location. The resource preview files will still remain in the ResourceSpace filestore. 

After enabling the plugin, there are a number of configuration options which specify how the relocation will occur.

offline_archive_config

Offline archive settings explained

Please select the metadata field that will hold the archive reference code

Select the field which contains data to be included in the archive filename. This should be a required field which is always populated.

Please enter the location that the archives will be created in

Full path to the archive directory where archived files will be moved. 

Note that from version 10.5 this must be set in the system configuration file as $offline_archive_archivepath

For restoration of resources in StaticSync folder you can enter a subfolder of the StaticSync folder that restored files will be placed in

This setting is only relevant for StaticSync users, otherwise it is ignored. When specified then the location set will be relative to the specified StaticSync subfolder. When left blank, the archived files will be relocated to the main StaticSync folder.

Note that from version 10.5 this must be set in the system configuration file as $offline_archive_restorepath

Preserve file timestamp?

Determines whether to carry across the timestamp of the original file. If not specified then the file will carry the timestamp at the point of relocation.

Offline archiving steps

  1. Ensure the $offline_archive_archivepath config has been set in your config.php file. For example:
    $offline_archive_archivepath = "/media/rs_archive"; 
  2. Change the workflow state of the resources you wish to archive to "Waiting to be archived".
  3. Go to Admin menu -> Administer Archives.
  4. Select "View resources pending archive".
  5. Verify that the resources you wish to archive are present in the table on this page, you can also use the "View resources as search" link to check the resources.
  6. Enter a name for the offline archive job in the "Archive prefix" text input and click "Create new archive job". You should see the message "Archive successfully created" with the name of the archive job. 
  7. Either manually run your ResourceSpace cron job or wait for the cron job to be executed. The original files of the archived resources will be moved to the $offline_archive_archivepath location and the workflow state of the resources will be changed to "Archived". 
  8. Check the $offline_archive_archivepath location on your server. A folder should be present with the same name as the offline archive job that contains the original files of the resources that were archived. 

Restoring archived resources

NOTE: To restore files you must have the "Please select the metadata field that will hold the archive reference code" field configured and set for your archived resources. 

Resources that have been archived will have a tool "Restore from archive" available on the Resource View page. Selecting this option will take you to a page to confirm the restoring of the resource.

Alternatively, go to Admin menu -> Administer Archives and select "Restore resources from archive", here you can either enter a list of comma separated resource IDs to restore or enter a collection ID containing resources to restore. 

After confirming you will see the message: "Resources successfully set for restore and will be restored when the relevant archives have been inserted or copied to the configured archive location". When viewing resources that are due to be restored you will see the message "Pending restore from archive" at the top of the View page. 

You can also navigate to Admin menu -> Administer Archives and select "View resources pending restore" to see the resources pending restore where you have the option to cancel the restore request. 

Similar to the archiving process you can then manually run your ResourceSpace cron job or wait for the cron job to be executed. This will move the original files for the resources back to the standard ResourceSpace filestore location.