Sakai resources (old)

From UFP-UV Sakai Wiki

Jump to: navigation, search

Contents


Description

Sakai resources are stored on the SAN (Storage Area Network) disk mounted on production server elearning.ufp.pt. These resources are daily backed up by CI (Centro de Informática) and kept for a period of one month. This is the Main Sakai Archive.

Since space is limited on the SAN disk, 'older files' are periodically moved to a secondary archive. Files associated with sites without tool activity on the last year are moved from the Main Sakai Archive to the Secondary Sakai Archive and a link is left on first pointing to the second. The file is also copied to the Secondary Sakai Archive Backup Disk.


Sakai Archive Description
Main Sakai Archive SAN disk mounted on elearning.ufp.pt
Secondary Sakai Archive Local disk mounted on elearning.ufp.pt. Have files from sites with no activity for more than one year.
Secondary Sakai Archive Disk Backup Local disk mounted on elearning-b.ufp.pt. Have copy of files stored in Secondary Sakai Archive.

Procedure

This procedure is executed once a year, preferbly during the Summer time (less usage).

Find and move 'old files':

  • Scan all Sakai course sites with no activity during the last year and, for each related file (Resources, DropBox and Attachments), do:
  1. Create an identical file path in the Secondary Sakai Archive
  2. Move from the Main Archive (SAN) to the Secondary Archive (elearning local disk)
  3. Create a link in the original location pointing to the new location
  4. Copy the file from the Secondary Archive to the Secondary Archive Disk Backup

Clean removed files, fix updated files:

  • Scan all files on the Secondary Sakai Archive and, for each file, do:
  • If no link exists at the same path in the Main Sakai Archive (file was removed from Sakai):
  1. Remove the file from the Secondary Sakai Archive
  2. Remove the file from the Secondary Sakai Archive Disk Backup
  • If file exists instead of link on the Main Sakai Archive (file was edited/new version uploaded):
  1. Remove the file from the Secondary Sakai Archive
  2. Remove the file from the Secondary Sakai Archive Disk Backup
  3. Move from the Main Archive (SAN) to the Secondary Archive (elearning local disk)
  4. Create a link in the original location pointing to the new location
  5. Copy the file from the Secondary Archive to the Secondary Archive Disk Backup


Locations

  • Scripts are located at: elearning.ufp.pt: /servicos/bin/sakai-resources-archive/
  • move-old-files script:
Usage:       move-old-files --all | --files [file_1 .. file_n]
 
Description: Moves files from sites matching conditions from Sakai Resource Main Archive
             to Secondary and Secondary Backup.
Options:
             --all    Move all files from sites matching conditions.
             --files  Move all files specified in command line.
Notes:
             - Check configuration in 'SakaiResourceArchive/Config.pm'.
             - Paths for command line specified files are relative to Sakai Resource Archive.
  • restore-files script:
Usage:       restore-files --all | --files [file_1 .. file_n]
 
Description: Restore files from Sakai Resource Secondary Archive
             to Sakai Resource Main Archive.
Options:
             --all    Restore all files.
             --files  Restore all files specified in command line.
Notes:
             - Check configuration in 'SakaiResourceArchive/Config.pm'.
             - Paths for command line specified files are relative to Sakai Resource Archive.
  • clean-removed-files script:
Usage:       clean-removed-files
 
Description: Remove all files from Sakai Resource Secondary Archive that have been deleted
             by Sakai (does not have a match in Sakai Resource Main Archive).
Notes:
             - Check configuration in 'SakaiResourceArchive/Config.pm'.
  • Main Sakai Archive is located at: elearning.ufp.pt: /emcf/sakai/arquivo
  • Secondary Sakai Archive is located at: elearning.ufp.pt: /servicos/sakai-arquivo-2
  • Secondary Sakai Archive Disk Backup is located at: elearning-b.ufp.pt: /servicos/sakai-arquivo-3

Deleted Files

Files deleted from Sakai will remain on back ups for a maximum of one month. Since the related database entry is also deleted, in order to keep track of deleted resources for an evetual restore operation, everyday, new entries from the sakai.CONTENT_RESOURCE database table are copied to the archive database table sakai_archive.CONTENT_RESOURCE.

  • Script is located at:
elearning.ufp.pt: /servicos/bin/sakai-archive.pl
Personal tools